use element update route
This commit is contained in:
parent
71bb131687
commit
299ccc4f58
1 changed files with 3 additions and 3 deletions
|
|
@ -112,7 +112,7 @@ export const useElementsStore = defineStore('elements', () => {
|
||||||
const encodedElementId = encodeURIComponent(elementId)
|
const encodedElementId = encodeURIComponent(elementId)
|
||||||
const elementUrl = `${API_BASE_URL}/api/elements/${encodedElementId}`
|
const elementUrl = `${API_BASE_URL}/api/elements/${encodedElementId}`
|
||||||
const response = await fetch(elementUrl, {
|
const response = await fetch(elementUrl, {
|
||||||
method: 'PATCH',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
body: JSON.stringify(input),
|
body: JSON.stringify(input),
|
||||||
|
|
@ -136,7 +136,7 @@ export const useElementsStore = defineStore('elements', () => {
|
||||||
const elementUrl = `${API_BASE_URL}/api/elements/${encodedElementId}`
|
const elementUrl = `${API_BASE_URL}/api/elements/${encodedElementId}`
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('iconImage', file)
|
formData.append('iconImage', file)
|
||||||
const response = await fetch(`${elementUrl}/icon-image`, {
|
const response = await fetch(elementUrl, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { Accept: 'application/json' },
|
headers: { Accept: 'application/json' },
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
|
|
@ -161,7 +161,7 @@ export const useElementsStore = defineStore('elements', () => {
|
||||||
const elementUrl = `${API_BASE_URL}/api/elements/${encodedElementId}`
|
const elementUrl = `${API_BASE_URL}/api/elements/${encodedElementId}`
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('pdf', file)
|
formData.append('pdf', file)
|
||||||
const response = await fetch(`${elementUrl}/pdf`, {
|
const response = await fetch(elementUrl, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { Accept: 'application/json' },
|
headers: { Accept: 'application/json' },
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue