mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-27 09:09:43 +02:00
feature/recipe-patch-improvements (#382)
* automated docs update * recipe rating component * recipe partial updates - closes #25 * use Vue.delete to update store * format * arrow functions * fix tests * format * initial context menu * localize * add confirmation dialog * context menu * fix bare exception * update line length * format all file with prettier * update changelog * download as json * update python dependencies * update javascript dependencies Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
parent
c196445e61
commit
be378cb20c
121 changed files with 18942 additions and 4765 deletions
|
@ -1,6 +1,6 @@
|
|||
import { baseURL } from "./api-utils";
|
||||
import { apiReq } from "./api-utils";
|
||||
import i18n from '@/i18n.js';
|
||||
import i18n from "@/i18n.js";
|
||||
|
||||
const prefix = baseURL + "meal-plans/";
|
||||
|
||||
|
@ -18,10 +18,10 @@ const mealPlanURLs = {
|
|||
export const mealplanAPI = {
|
||||
create(postBody) {
|
||||
return apiReq.post(
|
||||
mealPlanURLs.create,
|
||||
mealPlanURLs.create,
|
||||
postBody,
|
||||
function() { return i18n.t('meal-plan.mealplan-creation-failed')},
|
||||
function() { return i18n.t('meal-plan.mealplan-created'); }
|
||||
() => i18n.t("meal-plan.mealplan-creation-failed"),
|
||||
() => i18n.t("meal-plan.mealplan-created")
|
||||
);
|
||||
},
|
||||
|
||||
|
@ -41,19 +41,20 @@ export const mealplanAPI = {
|
|||
},
|
||||
|
||||
delete(id) {
|
||||
return apiReq.delete(mealPlanURLs.delete(id),
|
||||
return apiReq.delete(
|
||||
mealPlanURLs.delete(id),
|
||||
null,
|
||||
function() { return i18n.t('meal-plan.mealplan-deletion-failed'); },
|
||||
function() { return i18n.t('meal-plan.mealplan-deleted'); }
|
||||
() => i18n.t("meal-plan.mealplan-deletion-failed"),
|
||||
() => i18n.t("meal-plan.mealplan-deleted")
|
||||
);
|
||||
},
|
||||
|
||||
update(id, body) {
|
||||
return apiReq.put(
|
||||
mealPlanURLs.update(id),
|
||||
mealPlanURLs.update(id),
|
||||
body,
|
||||
function() { return i18n.t('meal-plan.mealplan-update-failed'); },
|
||||
function() { return i18n.t('meal-plan.mealplan-updated'); }
|
||||
() => i18n.t("meal-plan.mealplan-update-failed"),
|
||||
() => i18n.t("meal-plan.mealplan-updated")
|
||||
);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue