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

const prefix = "dawn/api/v1/"

const apiAccess = {
  getAccessPages(params) {
    return post(prefix + 'access/user-pages', params)
  },
  getRoleOptions(params) {
    return get(prefix + 'access/roles', params)
  },
  addAccessUser(params) {
    return post(prefix + 'access/users', params)
  },
  infoAccessUser(userPk) {
    return get(prefix + 'access/users/' + userPk)
  },
  updateAccessUser(params) {
    return put(prefix + 'access/users/' + params.userPk, params)
  },
  deleteAccessUser(userPk) {
    return del(prefix + 'access/users/' + userPk)
  }
}

export default apiAccess;