feat: add username field (#544)

* feat: add username field

* chore: update
This commit is contained in:
boojack
2022-11-23 22:27:21 +08:00
committed by GitHub
parent a0667abec8
commit 2042737004
34 changed files with 368 additions and 365 deletions

View File

@ -14,19 +14,18 @@ export function upsertSystemSetting(systemSetting: SystemSetting) {
return axios.post<ResponseObject<SystemSetting>>("/api/system/setting", systemSetting);
}
export function signin(email: string, password: string) {
export function signin(username: string, password: string) {
return axios.post<ResponseObject<User>>("/api/auth/signin", {
email,
username,
password,
});
}
export function signup(email: string, password: string, role: UserRole) {
export function signup(username: string, password: string, role: UserRole) {
return axios.post<ResponseObject<User>>("/api/auth/signup", {
email,
username,
password,
role,
name: email,
});
}