import { GetUserListParams, SaveUserType } from "@/types";
import { service } from "@dage/pc-components";

export const userApi = {
  getList(params: GetUserListParams) {
    return service.post("/api/sys/user/list", params);
  },
  handleType(id: number, isEnabled: number) {
    return service.get(`/api/sys/user/editStatus/${id}/${isEnabled}`);
  },
  del(ids: number) {
    return service.get(`/api/sys/user/removes/${ids}`);
  },
  resetPwd(id: number) {
    return service.get(`/api/sys/user/resetPass/${id}`);
  },
  getDetail(id: number) {
    return service.get(`/api/sys/user/detail/${id}`);
  },
  edit(params: SaveUserType) {
    return service.post("/api/sys/user/save", params);
  },
};
