Files
sb-front/src/api/userApi.js
T

21 lines
401 B
JavaScript
Raw Normal View History

2026-05-30 21:18:13 +09:00
import http from './http'
// 백엔드 /api/users 엔드포인트와 매핑
export const userApi = {
list() {
return http.get('/users')
},
get(id) {
return http.get(`/users/${id}`)
},
create(payload) {
return http.post('/users', payload)
},
update(id, payload) {
return http.put(`/users/${id}`, payload)
},
remove(id) {
return http.delete(`/users/${id}`)
},
}