import { get, post } from '../http/http'

const prefix = "dawn/api/v1/"

const user = {
  login(data) {
    return post(prefix + "auth/login", data)
  },
  sendOTP(data) {
    return get(prefix + "auth/otp", data)
  },
  preLogin(data) {
    return post(prefix + "auth/pre-login", data)
  },
  updatePassword(data) {
    return post(prefix + "auth/change-password", data)
  },
  refreshAuthMenu() {
    return get(prefix + "auth/resources")
  },
  logout() {
    return get(prefix + "auth/log-out")
  }
}

export default user;
