1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-04 13:04:13 +08:00

39 lines
1022 B
Go
Raw Normal View History

2022-09-15 10:44:43 +08:00
import http from '@/api';
import { Setting } from '../interface/setting';
export const getSettingInfo = () => {
return http.post<Setting.SettingInfo>(`/settings/search`);
};
export const updateSetting = (param: Setting.SettingUpdate) => {
return http.post(`/settings`, param);
};
2022-09-08 18:47:15 +08:00
export const updatePassword = (param: Setting.PasswordUpdate) => {
return http.post(`/settings/password`, param);
2022-09-08 18:47:15 +08:00
};
export const handleExpired = (param: Setting.PasswordUpdate) => {
return http.post(`/settings/expired/handle`, param);
};
export const syncTime = () => {
return http.post(`/settings/time/sync`, {});
};
2022-09-14 23:27:17 +08:00
export const cleanMonitors = () => {
return http.post(`/settings/monitor/clean`, {});
};
export const getMFA = () => {
return http.get<Setting.MFAInfo>(`/settings/mfa`, {});
};
2022-12-07 17:28:14 +08:00
export const loadDaemonJsonPath = () => {
return http.get<string>(`/settings/daemonjson`, {});
};
2022-09-14 23:27:17 +08:00
export const bindMFA = (param: Setting.MFABind) => {
return http.post(`/settings/mfa/bind`, param);
};