[CR] vodiace linky, [app] bugs

This commit is contained in:
romankko2 committed 2023-11-30 17:27:00 +01:00
1 parent f40065ffd1
commit 0a4c2ef44a
8 files changed
+76 -80

No files matched your search

@@ -104,6 +104,18 @@ export default {
.catch(error => Promise.reject(toastUtils.parseAndTranslate(error)))
},
async patch_auth_form(url: string, params = null, config?: any) {
config = this._config(config)
config.headers['Content-Type'] = 'multipart/form-data'
const formData = this._objectToFormData(params)
formData.append('_method', 'put')
config.transformRequest = formData => formData
return axios.post(url, formData, config)
.then(response => response.data)
.catch(error => Promise.reject(toastUtils.parseAndTranslate(error)))
},
async patch_data(url: string, params = null, config?: any) {
return axios.patch(url, this._objectToFormData(params), config)
.then(response => response.data.data)