File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1+ import { PostLoginParams } from 'params/auth' ;
2+
13import { http } from './http' ;
24import { OK , CREATED } from './http-status' ;
35
@@ -9,7 +11,7 @@ export const getAuth = async () => {
911 return res . data ;
1012} ;
1113
12- export const postAuthLogin = async ( code : string ) => {
14+ export const postAuthLogin = async ( { code } : PostLoginParams ) => {
1315 const res = await http . post ( `/auth/login` , { code } ) ;
1416
1517 if ( res . status !== CREATED ) throw new Error ( ) ;
Original file line number Diff line number Diff line change 1+ import { GetWorkspaceParams } from 'params/user' ;
2+
13import { http } from './http' ;
24import { OK } from './http-status' ;
35
4- export const getWorkspaces = async ( userId : number ) => {
5- const res = await http . get ( `/user/${ userId } /workspace` ) ;
6+ export const getWorkspaces = async ( { id } : GetWorkspaceParams ) => {
7+ const res = await http . get ( `/user/${ id } /workspace` ) ;
68
79 if ( res . status !== OK ) throw new Error ( ) ;
810
You can’t perform that action at this time.
0 commit comments