quick add shoppinglist

This commit is contained in:
smilerz
2022-01-04 17:44:29 -06:00
parent 29aa52aa3d
commit b919fb4ae8
5 changed files with 62 additions and 12 deletions

View File

@@ -234,7 +234,14 @@ export const ApiMixin = {
return apiClient[func](...parameters)
},
genericGetAPI: function (url, options) {
return axios.get(this.resolveDjangoUrl(url), { params: options, emulateJSON: true })
return axios.get(resolveDjangoUrl(url), { params: options, emulateJSON: true })
},
genericPostAPI: function (url, form) {
let data = new FormData()
Object.keys(form).forEach((field) => {
data.append(field, form[field])
})
return axios.post(resolveDjangoUrl(url), data)
},
},
}