add(settings): password changing
This commit is contained in:
@ -144,6 +144,26 @@ class Client
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a PUT request with json
|
||||
* @param {String} uri
|
||||
* @param {*} data
|
||||
* @returns {Promise<Response>}
|
||||
*/
|
||||
async _put(uri, data)
|
||||
{
|
||||
let response = await fetch(this._url + uri, {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"X-CSRFToken": getCookie("csrftoken"),
|
||||
"Content-Type": "application/json",
|
||||
'Accept-Language': this.lang.currentLang,
|
||||
},
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a PATCH request with json
|
||||
* @param {String} uri
|
||||
|
Reference in New Issue
Block a user