import $axios from '../index'

const authApi = {
  pubkeyApi: '/api/account/pubkey',
  loginApi: '/api/account/auth/signin',
  logoutApi: '/api/account/auth/signout'
}

// 登录
export function getPubkey() {
  return $axios.get(authApi.pubkeyApi)
}

// 登录
export function login(loginData) {
  return $axios.post(authApi.loginApi, loginData)
}

// 注销
export function logout() {
  return $axios.get(authApi.logoutApi)
}
