import { api, formatParams } from "@/utils/axios";

export function login(params) {
  return api(
    Object.assign(formatParams("POST", params), {
      url: "/admin-api/auth/login",
    })
  );
}

export function listMenus() {
  return api(
    Object.assign(formatParams("GET"), {
      url: "/admin-api/auth/list-menus",
    })
  );
}

// 修改密码
export function updatePassword(params) {
  return api(
      Object.assign(formatParams("PUT", params), {
          url: `/admin-api/system/user/profile/update-password`
      })
  );
}