From 8a1aa19dc9a03680e440f65549eda9e6db3c8c41 Mon Sep 17 00:00:00 2001 From: hay-kot Date: Sun, 11 Apr 2021 13:09:06 -0800 Subject: [PATCH] update by url --- frontend/src/api/recipe.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/api/recipe.js b/frontend/src/api/recipe.js index 50e45e593..42d5c47eb 100644 --- a/frontend/src/api/recipe.js +++ b/frontend/src/api/recipe.js @@ -61,6 +61,11 @@ export const recipeAPI = { return response; }, + async updateImagebyURL(slug, url) { + const response = apiReq.post(recipeURLs.updateImage(slug), { url: url }); + return response; + }, + async update(data) { let response = await apiReq.put(recipeURLs.update(data.slug), data); store.dispatch("requestRecentRecipes");