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`);
|
|
|
|
};
|
2022-09-09 17:17:02 +08:00
|
|
|
|
|
|
|
export const updateSetting = (param: Setting.SettingUpdate) => {
|
2022-12-13 18:54:28 +08:00
|
|
|
return http.post(`/settings`, param);
|
2022-09-09 17:17:02 +08:00
|
|
|
};
|
2022-09-08 18:47:15 +08:00
|
|
|
|
|
|
|
export const updatePassword = (param: Setting.PasswordUpdate) => {
|
2022-12-13 18:54:28 +08:00
|
|
|
return http.post(`/settings/password`, param);
|
2022-09-08 18:47:15 +08:00
|
|
|
};
|
2022-09-13 18:45:03 +08:00
|
|
|
|
2022-09-29 16:15:59 +08:00
|
|
|
export const handleExpired = (param: Setting.PasswordUpdate) => {
|
2022-12-13 18:54:28 +08:00
|
|
|
return http.post(`/settings/expired/handle`, param);
|
2022-09-29 16:15:59 +08:00
|
|
|
};
|
|
|
|
|
2022-09-13 18:45:03 +08:00
|
|
|
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);
|
|
|
|
};
|