fix(ui/notify): fix wrapper definition for fetchApi

This commit is contained in:
Taso
2021-10-13 21:39:57 -04:00
parent 6d9162e511
commit 28ba599019
+2 -1
View File
@@ -15,11 +15,12 @@ export const fetchNui = async (evName, data, mockData = null) => {
const resourceName = window.GetParentResourceName();
const rawResp = await fetch(`https://cfx-nui-${resourceName}/${evName}`, {
const rawResp = await fetch(`https://${resourceName}/${evName}`, {
body: JSON.stringify(data),
headers: {
"Content-Type": "application/json; charset=UTF8",
},
method: "POST",
});
return await rawResp.json();