import request from '@/request'
import type * as TYPE from './types'

/**
 * 用户登录
 * @param account 账号
 * @param password 密码
 */
export const login = (params: TYPE.LoginParams): Promise<ResponseData<TYPE.LoginResponseData>> => {
  return request.post('/user/login', params)
}

/**
 * 退出登录
 */
export const logout = (): Promise<ResponseData<object>> => {
  return request.get('/user/logout')
}
