1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-18 20:59:41 +02:00

fix: recipe image creation (#5579)

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
Kuchenpirat 2025-06-26 22:12:27 +02:00 committed by GitHub
parent af274bf476
commit 9e0db03f8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -150,7 +150,7 @@ export default defineNuxtComponent({
state.loading = true;
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) {
alert.error(i18n.t("events.something-went-wrong"));
state.loading = false;

View file

@ -7,8 +7,7 @@ export default defineNuxtPlugin(() => {
baseURL: "/", // api calls already pass with /api
timeout: 10000,
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer " + useCookie(tokenName).value,
Authorization: "Bearer " + useCookie(tokenName).value,
},
withCredentials: true,
});