2485ea05bf
Initial commit: SB 프론트엔드 (Vue 3 + Vite) - axios 공통 인스턴스 및 사용자 CRUD API 연동 - Pinia 사용자 스토어, 사용자 관리 화면(UsersView) - /api -> Spring Boot(8080) dev 프록시 구성 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> @
21 lines
401 B
JavaScript
21 lines
401 B
JavaScript
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}`)
|
|
},
|
|
}
|