feat: add app serve
This commit is contained in:
		
							
								
								
									
										1
									
								
								src/query/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/query/index.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| export * from './user/login.ts'; | ||||
							
								
								
									
										38
									
								
								src/query/user/login.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								src/query/user/login.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| import { query } from '@/module/query.ts'; | ||||
|  | ||||
| export const queryLogin = async (username: string, password: string) => { | ||||
|   return await query.post({ | ||||
|     path: 'user', | ||||
|     key: 'login', | ||||
|     payload: { | ||||
|       username, | ||||
|       password, | ||||
|     }, | ||||
|   }); | ||||
| }; | ||||
|  | ||||
| export const queryMe = async () => { | ||||
|   return await query.post({ | ||||
|     path: 'user', | ||||
|     key: 'me', | ||||
|   }); | ||||
| }; | ||||
|  | ||||
| export const switchOrg = async (username) => { | ||||
|   return await query.post({ | ||||
|     path: 'user', | ||||
|     key: 'switchOrg', | ||||
|     data: { | ||||
|       username, | ||||
|     }, | ||||
|   }); | ||||
| }; | ||||
| export const switchMe = async () => { | ||||
|   return await query.post({ | ||||
|     path: 'user', | ||||
|     key: 'switchOrg', | ||||
|     data: { | ||||
|       type: 'user', | ||||
|     }, | ||||
|   }); | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user