Files
1Panel/frontend/src/api/modules/auth.ts
2025-12-04 10:06:22 +00:00

31 lines
764 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 checkIsDemo = () => {
return http.get<boolean>('/auth/demo');
};
export const getAuthSetting = () => {
return http.get<Login.LoginSetting>(`/auth/setting`);
};
export const checkIsIntl = () => {
return http.get<boolean>('/auth/intl');
};