aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/api')
-rw-r--r--frontend/src/api/User.ts18
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> => {
10export const get_profile = async (token: string): Promise<UserProfile> => { 10export 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
19export const post_profile = async (token: string) => { 19export 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};