Files
tps-dashboard/frontend/src/services/authService.js
T
2026-05-15 09:46:42 +08:00

16 lines
386 B
JavaScript

import http from './http'
export async function login(username, password) {
const response = await http.post('/auth/login', { username, password })
return response.data
}
export async function logout() {
const response = await http.post('/auth/logout')
return response.data
}
export async function me() {
const response = await http.get('/auth/me')
return response.data
}