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

+11 -1
View File
@@ -197,10 +197,20 @@ export default {
formData.append('submitter_slug', this.submitterSlug)
formData.append('name', 'attachments')
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) => {
const data = await resp.json()