diff --git a/allianceauth/framework/static/allianceauth/framework/js/auth-framework.js b/allianceauth/framework/static/allianceauth/framework/js/auth-framework.js index b9e06391..700ea200 100644 --- a/allianceauth/framework/static/allianceauth/framework/js/auth-framework.js +++ b/allianceauth/framework/static/allianceauth/framework/js/auth-framework.js @@ -160,12 +160,12 @@ const _fetchAjaxData = async ({ * @param {boolean} responseIsJson Whether the response is expected to be JSON or not (default: true) * @return {Promise} 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} 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,