refactor and fixes

This commit is contained in:
Alex Turchyn
2023-08-19 21:05:54 +03:00
parent 077c55f7e8
commit 46f350217a
18 changed files with 297 additions and 95 deletions
+3 -2
View File
@@ -50,6 +50,7 @@ export default {
IconUpload,
IconInnerShadowTop
},
inject: ['baseFetch'],
props: {
templateId: {
type: [Number, String],
@@ -113,7 +114,7 @@ export default {
this.isProcessing = true
fetch(`/api/templates/${this.templateId}/documents`, {
this.baseFetch(`/api/templates/${this.templateId}/documents`, {
method: 'POST',
body: JSON.stringify({ blobs }),
headers: { 'Content-Type': 'application/json' }
@@ -124,7 +125,7 @@ export default {
this.isProcessing = false
})
} else {
fetch(`/api/templates/${this.templateId}/documents`, {
this.baseFetch(`/api/templates/${this.templateId}/documents`, {
method: 'POST',
body: new FormData(this.$refs.form)
}).then(resp => resp.json()).then((data) => {