feat: update front layout

This commit is contained in:
Maël Gangloff
2024-07-25 02:09:49 +02:00
parent 465aeb1ec9
commit 08da62c1b5
18 changed files with 405 additions and 168 deletions

18
assets/utils/api/user.ts Normal file
View File

@@ -0,0 +1,18 @@
import {request, User} from "./index";
export async function login(email: string, password: string): Promise<boolean> {
const response = await request({
method: 'POST',
url: 'login',
data: {email, password}
})
return response.status === 200
}
export async function getUser(): Promise<User> {
const response = await request<User>({
url: 'me'
})
return response.data
}