File tree Expand file tree Collapse file tree 1 file changed +21
-22
lines changed Expand file tree Collapse file tree 1 file changed +21
-22
lines changed Original file line number Diff line number Diff line change 1
1
import { User } from "@/types/user" ;
2
2
3
- export const setGetProfile = async (
4
- access_token : string ,
5
- user : User
6
- ) : Promise < User > => {
7
- const username = user . username ;
8
- const bio = user . bio ;
9
- const linkedin = user . linkedin ;
10
- const github = user . github ;
3
+ export const setGetProfile = async ( ) : // access_token: string,
4
+ // user: User
5
+ Promise < User > => {
6
+ // const username = user.username;
7
+ // const bio = user.bio;
8
+ // const linkedin = user.linkedin;
9
+ // const github = user.github;
11
10
12
11
// POST request
13
12
// url from environment variable
14
- const url = process . env . REACT_APP_USER_URL + "/" ;
15
- const response = await fetch ( url , {
16
- method : "POST" ,
17
- headers : {
18
- "Content-Type" : "application/json" ,
19
- Authorization : `Bearer ${ access_token } ` ,
20
- } ,
21
- body : JSON . stringify ( {
22
- username,
23
- bio,
24
- linkedin,
25
- github,
26
- } ) ,
27
- } ) ;
13
+ // const url = process.env.REACT_APP_USER_URL + "/";
14
+ // const response = await fetch(url, {
15
+ // method: "POST",
16
+ // headers: {
17
+ // "Content-Type": "application/json",
18
+ // Authorization: `Bearer ${access_token}`,
19
+ // },
20
+ // body: JSON.stringify({
21
+ // username,
22
+ // bio,
23
+ // linkedin,
24
+ // github,
25
+ // }),
26
+ // });
28
27
29
28
// return response.json();
30
29
return {
You can’t perform that action at this time.
0 commit comments