refactor: Renames recipe route to recipes to be consistent (#3540)
This commit is contained in:
@@ -131,7 +131,7 @@ async fn decode_recipe(
|
|||||||
|
|
||||||
pub fn routes(state: Arc<AppState>) -> Router {
|
pub fn routes(state: Arc<AppState>) -> Router {
|
||||||
Router::new()
|
Router::new()
|
||||||
.route("/recipe/create", post(create_recipe))
|
.route("/recipes/create", post(create_recipe))
|
||||||
.route("/recipes/encode", post(encode_recipe))
|
.route("/recipes/encode", post(encode_recipe))
|
||||||
.route("/recipes/decode", post(decode_recipe))
|
.route("/recipes/decode", post(decode_recipe))
|
||||||
.with_state(state)
|
.with_state(state)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export interface CreateRecipeResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function createRecipe(request: CreateRecipeRequest): Promise<CreateRecipeResponse> {
|
export async function createRecipe(request: CreateRecipeRequest): Promise<CreateRecipeResponse> {
|
||||||
const url = getApiUrl('/recipe/create');
|
const url = getApiUrl('/recipes/create');
|
||||||
console.log('Creating recipe at:', url);
|
console.log('Creating recipe at:', url);
|
||||||
console.log('Request:', JSON.stringify(request, null, 2));
|
console.log('Request:', JSON.stringify(request, null, 2));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user