mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-08-23 18:31:43 +02:00
[CHANGE] To async
This commit is contained in:
parent
4cc108ab7f
commit
c1cd7ca64f
@ -160,12 +160,12 @@ const _fetchAjaxData = async ({
|
||||
* @param {boolean} responseIsJson Whether the response is expected to be JSON or not (default: true)
|
||||
* @return {Promise<string>} The fetched data
|
||||
*/
|
||||
const fetchGet = ({
|
||||
const fetchGet = async ({
|
||||
url,
|
||||
payload = null,
|
||||
responseIsJson = true
|
||||
}) => {
|
||||
return _fetchAjaxData({
|
||||
return await _fetchAjaxData({
|
||||
url: url,
|
||||
method: 'get',
|
||||
payload: payload,
|
||||
@ -203,13 +203,13 @@ const fetchGet = ({
|
||||
* @param {boolean} responseIsJson Whether the response is expected to be JSON or not (default: true)
|
||||
* @return {Promise<string>} The fetched data
|
||||
*/
|
||||
const fetchPost = ({
|
||||
const fetchPost = async ({
|
||||
url,
|
||||
csrfToken,
|
||||
payload = null,
|
||||
responseIsJson = true
|
||||
}) => {
|
||||
return _fetchAjaxData({
|
||||
return await _fetchAjaxData({
|
||||
url: url,
|
||||
method: 'post',
|
||||
csrfToken: csrfToken,
|
||||
|
Loading…
x
Reference in New Issue
Block a user