mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
nothing
This commit is contained in:
20
src/api/account.ts
Normal file
20
src/api/account.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import QueryAPI from '@/api/query'
|
||||
import { BASE_API } from '@/data/constants'
|
||||
import { APIRoot } from './api-models'
|
||||
|
||||
const ACCOUNT_URL = `${BASE_API}account/`
|
||||
|
||||
export async function Register(name: string, email: string, password: string): Promise<APIRoot<string>> {
|
||||
return QueryAPI<string>(`${ACCOUNT_URL}register`, {
|
||||
name,
|
||||
email,
|
||||
password,
|
||||
})
|
||||
}
|
||||
|
||||
export async function Login(nameOrEmail: string, password: string): Promise<APIRoot<string>> {
|
||||
return QueryAPI<string>(`${ACCOUNT_URL}login`, {
|
||||
nameOrEmail,
|
||||
password,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user