2026-05-31 15:42:52 +09:00
|
|
|
import http from './http'
|
|
|
|
|
|
|
|
|
|
// 관리자 태그 관리 API (/api/admin)
|
|
|
|
|
export const adminApi = {
|
|
|
|
|
categories() {
|
|
|
|
|
return http.get('/admin/tag-categories')
|
|
|
|
|
},
|
|
|
|
|
createCategory(payload) {
|
|
|
|
|
return http.post('/admin/tag-categories', payload)
|
|
|
|
|
},
|
|
|
|
|
updateCategory(id, payload) {
|
|
|
|
|
return http.put(`/admin/tag-categories/${id}`, payload)
|
|
|
|
|
},
|
|
|
|
|
removeCategory(id) {
|
|
|
|
|
return http.delete(`/admin/tag-categories/${id}`)
|
|
|
|
|
},
|
|
|
|
|
createTag(payload) {
|
|
|
|
|
return http.post('/admin/tags', payload)
|
|
|
|
|
},
|
|
|
|
|
updateTag(id, payload) {
|
|
|
|
|
return http.put(`/admin/tags/${id}`, payload)
|
|
|
|
|
},
|
|
|
|
|
removeTag(id) {
|
|
|
|
|
return http.delete(`/admin/tags/${id}`)
|
|
|
|
|
},
|
|
|
|
|
getBoardSetting() {
|
|
|
|
|
return http.get('/admin/board-setting')
|
|
|
|
|
},
|
|
|
|
|
setBoardSetting(tagCategoryId) {
|
|
|
|
|
return http.put('/admin/board-setting', { tagCategoryId })
|
|
|
|
|
},
|
2026-05-31 19:02:05 +09:00
|
|
|
|
|
|
|
|
// 회원 관리 (관리자)
|
|
|
|
|
members() {
|
|
|
|
|
return http.get('/admin/members')
|
|
|
|
|
},
|
|
|
|
|
updateMemberRole(id, role) {
|
|
|
|
|
return http.put(`/admin/members/${id}/role`, { role })
|
|
|
|
|
},
|
|
|
|
|
updateMemberStatus(id, status) {
|
|
|
|
|
return http.put(`/admin/members/${id}/status`, { status })
|
|
|
|
|
},
|
|
|
|
|
removeMember(id) {
|
|
|
|
|
return http.delete(`/admin/members/${id}`)
|
|
|
|
|
},
|
2026-05-31 15:42:52 +09:00
|
|
|
}
|