9861ba90ae
CI / build (push) Failing after 15m5s
- auth 스토어 isPremium/isAdmin 추가 (plan===PREMIUM 또는 관리자) - 사이드바: 통계·고정지출·예산·태그 메뉴에 무료 회원 잠금 배지(🔒) - 라우트 가드: 유료 전용 화면(requiresPremium) → 무료 회원은 /upgrade - UpgradeView: 무료/유료 기능 비교 + 업그레이드 안내 - http 인터셉터: 403 PREMIUM_REQUIRED → premium:required 이벤트 → 업그레이드 화면 - 무료 화면의 유료 API 호출 차단(홈 예산·내역 태그·OCR·카드알림 게이팅) - 회원관리: 멤버십 컬럼 + 무료/유료 토글(관리자) - 설정: 데이터 백업/복구 유료 게이팅, 계정정보에 멤버십 표시 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
75 lines
2.0 KiB
JavaScript
75 lines
2.0 KiB
JavaScript
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 })
|
|
},
|
|
|
|
// 기본(디폴트) 분류 관리 (관리자) — 사용자가 '기본 분류 불러오기'로 가져감
|
|
defaultCategories() {
|
|
return http.get('/admin/default-categories')
|
|
},
|
|
createDefaultCategory(payload) {
|
|
return http.post('/admin/default-categories', payload)
|
|
},
|
|
updateDefaultCategory(id, payload) {
|
|
return http.put(`/admin/default-categories/${id}`, payload)
|
|
},
|
|
removeDefaultCategory(id) {
|
|
return http.delete(`/admin/default-categories/${id}`)
|
|
},
|
|
reorderDefaultCategories(type, ids) {
|
|
return http.put('/admin/default-categories/reorder', { type, ids })
|
|
},
|
|
|
|
// 앱 설정 (관리자)
|
|
getSignupSetting() {
|
|
return http.get('/admin/signup-setting')
|
|
},
|
|
setSignupSetting(enabled) {
|
|
return http.put('/admin/signup-setting', { enabled })
|
|
},
|
|
|
|
// 회원 관리 (관리자)
|
|
members() {
|
|
return http.get('/admin/members')
|
|
},
|
|
updateMemberRole(id, role) {
|
|
return http.put(`/admin/members/${id}/role`, { role })
|
|
},
|
|
updateMemberPlan(id, plan) {
|
|
return http.put(`/admin/members/${id}/plan`, { plan })
|
|
},
|
|
updateMemberStatus(id, status) {
|
|
return http.put(`/admin/members/${id}/status`, { status })
|
|
},
|
|
removeMember(id) {
|
|
return http.delete(`/admin/members/${id}`)
|
|
},
|
|
}
|