File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ const getUsers = async (
4343 setErrorMessage : SetStateCallback < string > ,
4444 query : Record < string , string > = { } ,
4545) : Promise < void > => {
46+ // todo fix
4647 const url = new URL ( `${ API_BASE } /api/v1/user` ) ;
4748 url . search = new URLSearchParams ( query ) . toString ( ) ;
4849
@@ -70,6 +71,7 @@ const getUsers = async (
7071
7172const updateUser = async ( data : UserData ) : Promise < void > => {
7273 console . log ( data ) ;
74+ // todo fix
7375 const url = new URL ( `${ API_BASE } /api/auth/gitAccount` ) ;
7476
7577 try {
@@ -89,10 +91,11 @@ const getUserLoggedIn = async (
8991 setIsError : SetStateCallback < boolean > ,
9092 setAuth : SetStateCallback < boolean > ,
9193) : Promise < void > => {
92- const url = new URL ( `${ API_BASE } /api/auth/me` ) ;
93-
9494 try {
95- const response : AxiosResponse < UserData > = await axios ( url . toString ( ) , getAxiosConfig ( ) ) ;
95+ const response : AxiosResponse < UserData > = await axios (
96+ `${ API_BASE } /api/auth/me` ,
97+ getAxiosConfig ( ) ,
98+ ) ;
9699 const data = response . data ;
97100 setIsLoading ( false ) ;
98101 setIsAdmin ( data . admin || false ) ;
You can’t perform that action at this time.
0 commit comments