import request from '@/utils/request.js'

/**
 * Login
 * @param {{ username: string, password: string }} data
 */
export function login(data) {
  return request.post('/auth/login', data)
}

/**
 * Logout
 */
export function logout() {
  return request.post('/auth/logout')
}

/**
 * Get current authenticated user info
 */
export function getMe() {
  return request.get('/auth/me')
}
