This commit is contained in:
2022-10-20 00:28:21 +02:00
parent cabdff7177
commit ae0eb2c65a
11 changed files with 126 additions and 92 deletions

View File

@ -1,7 +1,8 @@
import type { LoginUserBody, UserInfo } from '@core';
import { post } from './request';
import { currentUser } from '../store/user';
export async function login(raw: LoginUserBody) {
const user = await post<UserInfo>('/user/login', raw);
console.debug(user);
currentUser.set(user);
}