update routes

This commit is contained in:
Pete Matsyburka committed 2026-10-04 11:04:14 +03:00
1 parent 63a874528a
commit 25504e8cb1
5 files changed
+18 -19

No files matched your search

@@ -285,7 +285,7 @@ export default {
}, 1000)
},
sendVerificationCode () {
return fetch(this.baseUrl + '/api/send_phone_verification_code', {
const options = {
method: 'POST',
body: JSON.stringify({
submitter_slug: this.submitterSlug,
@@ -293,6 +293,14 @@ export default {
phone: this.fullInternationalPhoneValue
}),
headers: { 'Content-Type': 'application/json' }
}
return fetch(this.baseUrl + `/s/${this.submitterSlug}/send_phone_verification_code`, options).then((resp) => {
if (resp.status === 404) {
return fetch(this.baseUrl + '/api/send_phone_verification_code', options)
} else {
return resp
}
}).then(async (resp) => {
if ([422, 429].includes(resp.status)) {
const data = await resp.json()