update by url

This commit is contained in:
hay-kot 2021-04-11 13:09:06 -08:00
commit 8a1aa19dc9

View file

@ -61,6 +61,11 @@ export const recipeAPI = {
return response; return response;
}, },
async updateImagebyURL(slug, url) {
const response = apiReq.post(recipeURLs.updateImage(slug), { url: url });
return response;
},
async update(data) { async update(data) {
let response = await apiReq.put(recipeURLs.update(data.slug), data); let response = await apiReq.put(recipeURLs.update(data.slug), data);
store.dispatch("requestRecentRecipes"); store.dispatch("requestRecentRecipes");