import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/api/roles',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/api/logout',
    method: 'post'
  })
}
export function uploadAvatar(data) {
  return request({
    url: '/api/users/uploadAvatar',
    method: 'post',
    data
  })
}
