import { setParams } from '/@/utils';
import { defHttp } from '/@/utils/http/axios';
enum Api {
  onlineForceLogout = '/monitor/online/forceLogout',
  onlineList = '/monitor/online/query/page',
  onlineListToken = '/monitor/online/query/token/list',
}

/**
 * @description: 强退用户
 * @method: POST
 * @params loginType string
 * @params token string
 */
export const onlineForceLogout = (params?: object) => {
  return defHttp.post({ url: Api.onlineForceLogout, params: params });
};
/**
 * @description: 在线用户列表
 * @method: POST
 */
export const onlineList = (params?: object) => {
  return defHttp.post({ url: Api.onlineList, params: setParams(params) });
};

export const onlineListToken = (params?: object) => {
  return defHttp.post({ url: Api.onlineListToken, params: setParams(params) });
};
