diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-10-24 23:19:33 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-10-24 23:19:33 +0300 |
commit | 9dfd6aa77518b3a1e6bfd926a3b7719c32a8c97f (patch) | |
tree | d10fc76ef816160871e3955aa75821bc5d5088d4 /src/lib/api.ts | |
parent | 4ca81621e5b31922565b4149ebad1deb5161071a (diff) |
use the new api
Diffstat (limited to 'src/lib/api.ts')
-rw-r--r-- | src/lib/api.ts | 17 |
1 files changed, 8 insertions, 9 deletions
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 + }); } |