diff options
| author | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 10:37:54 -0600 |
|---|---|---|
| committer | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 10:37:54 -0600 |
| commit | 395b063a8de2deefc76a038075638440d57a67c7 (patch) | |
| tree | 45fbb14946645363a96dd023b1f4dca24fb25717 | |
| parent | fixed missing useEffect dependancie(_set_profile was missing) (diff) | |
| download | lphub-395b063a8de2deefc76a038075638440d57a67c7.tar.gz lphub-395b063a8de2deefc76a038075638440d57a67c7.tar.bz2 lphub-395b063a8de2deefc76a038075638440d57a67c7.zip | |
removed unused var along with adding proper type to post_profile()
| -rw-r--r-- | frontend/src/api/User.ts | 18 |
1 files 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<UserProfile> => { | |||
| 10 | export const get_profile = async (token: string): Promise<UserProfile> => { | 10 | export const get_profile = async (token: string): Promise<UserProfile> => { |
| 11 | const response = await axios.get(url(`profile`), { | 11 | const response = await axios.get(url(`profile`), { |
| 12 | headers: { | 12 | headers: { |
| 13 | "Authorization": token, | 13 | Authorization: token, |
| 14 | } | 14 | }, |
| 15 | }); | 15 | }); |
| 16 | return response.data.data; | 16 | return response.data.data; |
| 17 | }; | 17 | }; |
| 18 | 18 | ||
| 19 | export const post_profile = async (token: string) => { | 19 | export const post_profile = async (token: string): Promise<void> => { |
| 20 | const _ = await axios.post(url(`profile`), {}, { | 20 | await axios.post( |
| 21 | headers: { | 21 | url(`profile`), |
| 22 | "Authorization": token, | 22 | {}, |
| 23 | { | ||
| 24 | headers: { | ||
| 25 | Authorization: token, | ||
| 26 | }, | ||
| 23 | } | 27 | } |
| 24 | }); | 28 | ); |
| 25 | }; | 29 | }; |