mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-22 08:00:53 +00:00
27 lines
695 B
Go
27 lines
695 B
Go
import { Login } from '@/api/interface/auth';
|
|
import http from '@/api';
|
|
|
|
export const loginApi = (params: Login.ReqLoginForm) => {
|
|
return http.post<Login.ResLogin>(`/auth/login`, params);
|
|
};
|
|
|
|
export const mfaLoginApi = (params: Login.MFALoginForm) => {
|
|
return http.post<Login.ResLogin>(`/auth/mfalogin`, params);
|
|
};
|
|
|
|
export const getCaptcha = () => {
|
|
return http.get<Login.ResCaptcha>(`/auth/captcha`);
|
|
};
|
|
|
|
export const logOutApi = () => {
|
|
return http.post<any>(`/auth/logout`);
|
|
};
|
|
|
|
export const checkIsSafety = (code: string) => {
|
|
return http.get<boolean>(`/auth/issafety?code=${code}`);
|
|
};
|
|
|
|
export const checkIsDemo = () => {
|
|
return http.get<boolean>('/auth/demo');
|
|
};
|