aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/api/User.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/api/User.tsx')
-rw-r--r--frontend/src/api/User.tsx25
1 files changed, 0 insertions, 25 deletions
diff --git a/frontend/src/api/User.tsx b/frontend/src/api/User.tsx
deleted file mode 100644
index c4d1944..0000000
--- a/frontend/src/api/User.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
1import axios from "axios";
2import { url } from "./Api";
3import { UserProfile } from "../types/Profile";
4
5export const get_user = async (user_id: string): Promise<UserProfile> => {
6 const response = await axios.get(url(`users/${user_id}`));
7 return response.data.data;
8};
9
10export const get_profile = async (token: string): Promise<UserProfile> => {
11 const response = await axios.get(url(`profile`), {
12 headers: {
13 "Authorization": token,
14 }
15 });
16 return response.data.data;
17};
18
19export const post_profile = async (token: string) => {
20 const _ = await axios.post(url(`profile`), {}, {
21 headers: {
22 "Authorization": token,
23 }
24 });
25};