From 395b063a8de2deefc76a038075638440d57a67c7 Mon Sep 17 00:00:00 2001 From: FifthWit Date: Thu, 30 Jan 2025 10:37:54 -0600 Subject: removed unused var along with adding proper type to post_profile() --- frontend/src/api/User.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/frontend/src/api/User.ts b/frontend/src/api/User.ts index 88da0f2..004aa22 100644 --- a/frontend/src/api/User.ts +++ b/frontend/src/api/User.ts @@ -10,16 +10,20 @@ export const get_user = async (user_id: string): Promise => { export const get_profile = async (token: string): Promise => { const response = await axios.get(url(`profile`), { headers: { - "Authorization": token, - } + Authorization: token, + }, }); return response.data.data; }; -export const post_profile = async (token: string) => { - const _ = await axios.post(url(`profile`), {}, { - headers: { - "Authorization": token, +export const post_profile = async (token: string): Promise => { + await axios.post( + url(`profile`), + {}, + { + headers: { + Authorization: token, + }, } - }); + ); }; -- cgit v1.2.3