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:
@ -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 () {
|
||||||
|
Reference in New Issue
Block a user