diff --git a/frontend/rabbi_gerzi/src/stores/elements.ts b/frontend/rabbi_gerzi/src/stores/elements.ts index bf01744..5a886d5 100644 --- a/frontend/rabbi_gerzi/src/stores/elements.ts +++ b/frontend/rabbi_gerzi/src/stores/elements.ts @@ -112,7 +112,7 @@ export const useElementsStore = defineStore('elements', () => { const encodedElementId = encodeURIComponent(elementId) const elementUrl = `${API_BASE_URL}/api/elements/${encodedElementId}` const response = await fetch(elementUrl, { - method: 'PATCH', + method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include', body: JSON.stringify(input), @@ -136,7 +136,7 @@ export const useElementsStore = defineStore('elements', () => { const elementUrl = `${API_BASE_URL}/api/elements/${encodedElementId}` const formData = new FormData() formData.append('iconImage', file) - const response = await fetch(`${elementUrl}/icon-image`, { + const response = await fetch(elementUrl, { method: 'POST', headers: { Accept: 'application/json' }, credentials: 'include', @@ -161,7 +161,7 @@ export const useElementsStore = defineStore('elements', () => { const elementUrl = `${API_BASE_URL}/api/elements/${encodedElementId}` const formData = new FormData() formData.append('pdf', file) - const response = await fetch(`${elementUrl}/pdf`, { + const response = await fetch(elementUrl, { method: 'POST', headers: { Accept: 'application/json' }, credentials: 'include',