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) => {
|
|
|
|
return http.put(`/settings`, param);
|
|
|
|
};
|
2022-09-08 18:47:15 +08:00
|
|
|
|
|
|
|
export const updatePassword = (param: Setting.PasswordUpdate) => {
|
|
|
|
return http.put(`/settings/password`, param);
|
|
|
|
};
|
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`, {});
|
|
|
|
};
|
|
|
|
|
|
|
|
export const bindMFA = (param: Setting.MFABind) => {
|
|
|
|
return http.post(`/settings/mfa/bind`, param);
|
|
|
|
};
|