u
This commit is contained in:
1 parent
bcc4722efc
commit
f48536774f
403 files changed
+34776
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import { httpPostJson } from "@/utils/http";
|
||||
|
||||
interface loginApiParams {
|
||||
loginCredential: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
interface loginApiResult {
|
||||
id: string;
|
||||
account: string;
|
||||
name: string;
|
||||
email: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
export const loginApi = (params: loginApiParams) => {
|
||||
return httpPostJson<loginApiResult>(`/auth/login`, params);
|
||||
};
|
||||
|
||||
interface registerApiParams {
|
||||
account: string;
|
||||
name: string;
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export const registerApi = (params: registerApiParams) => {
|
||||
return httpPostJson<null>(`/auth/register`, params);
|
||||
};
|
||||
|
||||
export interface forgetApiParams {
|
||||
forgetCredential: string;
|
||||
}
|
||||
export const forgetApi = (params: forgetApiParams) => {
|
||||
return httpPostJson<null>(`/auth/forget`, params);
|
||||
};
|
||||
Reference in new issue
Block a user