import fetchAPI from '../utils/fetch'

export default {
  login (username, password) {
    return fetchAPI('user/login/', 'post', {
      username,
      password
    })
  },
  logout () {
    return fetchAPI('user/logout/', 'get')
  },
  getUser () {
    return fetchAPI('user/getInfo/', 'get')
  },
  resetPassword (new_password) {
    return fetchAPI('user/resetPassword/', 'post', {
      new_password
    })
  }
}
