update routes

This commit is contained in:
Pete Matsyburka committed 2026-09-27 09:43:48 +03:00
1 parent 6a9b123cdc
commit f637ee907c
6 files changed
+43 -6

No files matched your search

@@ -501,10 +501,20 @@ export default {
formData.append('name', 'attachments')
formData.append('type', 'initials')
return fetch(this.baseUrl + '/api/attachments', {
return fetch(this.baseUrl + `/s/${this.submitterSlug}/upload`, {
method: 'POST',
headers: { ...this.fetchOptions.headers },
body: formData
}).then((resp) => {
if (resp.status === 404) {
return fetch(this.baseUrl + '/api/attachments', {
method: 'POST',
headers: { ...this.fetchOptions.headers },
body: formData
})
} else {
return resp
}
}).then(async (resp) => {
if (resp.status === 422 || resp.status === 500) {
const data = await resp.json()