[CHANGE] To async

This commit is contained in:
Peter Pfeufer 2025-08-09 10:36:22 +02:00
parent 4cc108ab7f
commit c1cd7ca64f
No known key found for this signature in database

View File

@ -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,