From 9dfd6aa77518b3a1e6bfd926a3b7719c32a8c97f Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 24 Oct 2022 23:19:33 +0300 Subject: use the new api --- src/lib/api.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/lib/api.ts') diff --git a/src/lib/api.ts b/src/lib/api.ts index e6ac0f1..160e308 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -1,12 +1,11 @@ -const base = 'https://localhost:5001/api' +const base = 'http://localhost:6969' export async function api(method: string, resource: string, data?: any) { - // console.log("API USED", method, resource, data); - return await fetch(`${base}/${method}/${resource}`, { - method, - headers: { - 'content-type': 'application/json' - }, - body: data - }); + return await fetch(`${base}/${resource}`, { + method, + headers: { + 'content-type': 'application/json' + }, + body: data + }); } -- cgit v1.2.3