pass fetch options

This commit is contained in:
Pete Matsyburka committed 2026-08-24 14:43:13 +03:00
1 parent 11c76bf554
commit 9e2aa6f8c8
4 files changed
+31 -7

No files matched your search

@@ -121,6 +121,11 @@ export default {
type: String,
required: false,
default: ''
},
fetchOptions: {
type: Object,
required: false,
default: () => ({})
}
},
emits: ['focus', 'submit', 'update:model-value', 'attached'],
@@ -234,7 +239,8 @@ export default {
body: JSON.stringify({
submitter_slug: this.submitterSlug
}),
headers: { 'Content-Type': 'application/json' }
...this.fetchOptions,
headers: { 'Content-Type': 'application/json', ...this.fetchOptions.headers }
}).then(async (resp) => {
if (resp.status === 422 || resp.status === 500) {
this.isProcessing = false
@@ -274,7 +280,8 @@ export default {
check_status: checkStatus,
referer: this.normalizedPaymentUrl()
}),
headers: { 'Content-Type': 'application/json' }
...this.fetchOptions,
headers: { 'Content-Type': 'application/json', ...this.fetchOptions.headers }
}).then(async (resp) => {
if (resp.status === 422 || resp.status === 500) {
const data = await resp.json()