From ea4761a375dc114a1254f463b2a0f089b551a4d7 Mon Sep 17 00:00:00 2001 From: Johnson Chen Date: Sun, 2 Oct 2022 06:42:24 +0000 Subject: [PATCH] initial tags --- src/lib/api.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/api.ts b/src/lib/api.ts index d26e713..af9181f 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -44,6 +44,15 @@ export const getCategory = async (id: string): Promise => { return response.json() as APIResponse; }; +export const getAllTags = async (): Promise => { + // TODO: Implement pagination as per API + const response: Response = await fetch(`${ApiURL}/tags`, { + headers, + }); + + return response.json() as APIResponse; +}; + export const getAllTransactions = async (): Promise => { // TODO: Implement pagination as per API const response: Response = await fetch(`${ApiURL}/transactions`, {