mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Merge pull request #267 from TasoOneAsia/fix/gh-265
fix(ui/notify): fix wrapper definition for fetchNui
This commit is contained in:
+2
-1
@@ -15,11 +15,12 @@ export const fetchNui = async (evName, data, mockData = null) => {
|
|||||||
|
|
||||||
const resourceName = "qb-core";
|
const resourceName = "qb-core";
|
||||||
|
|
||||||
const rawResp = await fetch(`https://cfx-nui-${resourceName}/${evName}`, {
|
const rawResp = await fetch(`https://${resourceName}/${evName}`, {
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json; charset=UTF8",
|
"Content-Type": "application/json; charset=UTF8",
|
||||||
},
|
},
|
||||||
|
method: "POST",
|
||||||
});
|
});
|
||||||
|
|
||||||
return await rawResp.json();
|
return await rawResp.json();
|
||||||
|
|||||||
Reference in New Issue
Block a user