mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-19 05:09:40 +02:00
fix: recipe image creation (#5579)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
parent
af274bf476
commit
9e0db03f8c
2 changed files with 2 additions and 3 deletions
|
@ -150,7 +150,7 @@ export default defineNuxtComponent({
|
||||||
|
|
||||||
state.loading = true;
|
state.loading = true;
|
||||||
const translateLanguage = shouldTranslate.value ? i18n.locale : undefined;
|
const translateLanguage = shouldTranslate.value ? i18n.locale : undefined;
|
||||||
const { data, error } = await api.recipes.createOneFromImage(uploadedImage.value, uploadedImageName.value, translateLanguage);
|
const { data, error } = await api.recipes.createOneFromImage(uploadedImage.value, uploadedImageName.value, translateLanguage?.value);
|
||||||
if (error || !data) {
|
if (error || !data) {
|
||||||
alert.error(i18n.t("events.something-went-wrong"));
|
alert.error(i18n.t("events.something-went-wrong"));
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
|
|
|
@ -7,8 +7,7 @@ export default defineNuxtPlugin(() => {
|
||||||
baseURL: "/", // api calls already pass with /api
|
baseURL: "/", // api calls already pass with /api
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
Authorization: "Bearer " + useCookie(tokenName).value,
|
||||||
"Authorization": "Bearer " + useCookie(tokenName).value,
|
|
||||||
},
|
},
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue