use promisedRequest for theme resource fetching

This commit is contained in:
Henry Jameson 2026-06-30 06:54:51 +03:00
commit 4b3ad72b31
2 changed files with 21 additions and 15 deletions

View file

@ -71,6 +71,7 @@ export const promisedRequest = async ({
url,
payload,
formData,
cache,
credentials,
headers = {},
}) => {
@ -87,6 +88,10 @@ export const promisedRequest = async ({
options.headers['Content-Type'] = 'application/json'
}
if (cache) {
options.cache = cache
}
if (formData || payload) {
options.body = formData || JSON.stringify(payload)
}