1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-07-17 01:32:33 +02:00

UI: Post data using 'application/json'

This commit is contained in:
Ralph Slooten
2022-09-03 16:46:21 +12:00
parent 3c81e152e6
commit 6dbdbf1637

View File

@ -96,12 +96,8 @@ const commonMixins = {
*/ */
post: function (url, values, callback) { post: function (url, values, callback) {
let self = this; let self = this;
const params = new URLSearchParams();
for (const [key, value] of Object.entries(values)) {
params.append(key, value);
}
self.loading++; self.loading++;
axios.post(url, params) axios.post(url, values)
.then(callback) .then(callback)
.catch(self.handleError) .catch(self.handleError)
.then(function () { .then(function () {