From 28ba599019578a709a5379d428174bd7ee5b0ed1 Mon Sep 17 00:00:00 2001 From: Taso Date: Wed, 13 Oct 2021 21:39:57 -0400 Subject: [PATCH] fix(ui/notify): fix wrapper definition for fetchApi --- html/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/utils.js b/html/utils.js index e608831..bf2fb8c 100644 --- a/html/utils.js +++ b/html/utils.js @@ -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();