import { request } from "@/utils/request";

export const getServerStatus = () =>
  request({
    url: "/api/sys/status",
    loading: true,
  });

export const adminLogin = (params: { loginName: string; password: string }) =>
  request({
    url: "/api/user/login",
    params,
    loading: true,
  });
export const scanLogin = (params: { device: string; deviceName: string }) =>
  request({
    url: "/api/user/scanner/login",
    params,
    loading: true,
  });
export const getSubjectList = (params: { examId: number | null }) =>
  request({
    url: "/api/admin/subject/list",
    params,
  });

export const adminLogout = () =>
  request({
    url: "/api/user/logout",
  });
export const heatBeatApi = () =>
  request({
    url: "/api/sys/heartbeat",
  });
