import { CommonResponse } from "@/types/common";
import {request} from "@@/exports";


export async function registerUser(params: UserRegisterParams, options?: { skipErrorHandler?: boolean }): Promise<CommonResponse<string>> {
  return request('/user-api/auth/register', {
    method: 'POST',
    data: params,
    getResponse: true,
  });
}
export async function loginUser(params: UserLoginParams): Promise<CommonResponse<UserLoginResult>> {
  return request('/user-api/auth/login', {
    method: 'POST',
    data: params,
    // getResponse: true,
  });
}
export async function logoutUser() {
  return request('/user-api/auth/logout', {
    method: 'POST',
  });
}