feat: 가계부·게시판 프론트엔드 구현 + Slim Budget 브랜딩/모바일 대응
- 가계부: 대시보드(예산 대비 지출·분류별 파이·기간별 막대·순자산 추이), 내역(검색·필터·태그), 계좌(은행/카드/대출/투자), 예산, 분류, 정기 거래, 태그, 투자 포트폴리오(종목·매수/매도·평가손익) - 게시판: 목록/상세/작성(마크다운)/댓글/태그/열람제한 - 공통: 인증(Bearer 토큰·401 처리), 모바일 반응형(드로어·아이콘 버튼), Slim Budget 브랜딩(로고/타이틀/푸터), 홈 대시보드 자리 - 문서: docs/FRONTEND.md Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import http from './http'
|
||||
|
||||
// 백엔드 /api/board 엔드포인트와 매핑
|
||||
export const boardApi = {
|
||||
list({ page = 1, size = 10, tag = '', keyword = '', searchType = '' } = {}) {
|
||||
return http.get('/board/posts', {
|
||||
params: {
|
||||
page,
|
||||
size,
|
||||
tag: tag || undefined,
|
||||
keyword: keyword || undefined,
|
||||
searchType: keyword ? searchType || 'title' : undefined,
|
||||
},
|
||||
})
|
||||
},
|
||||
get(id) {
|
||||
return http.get(`/board/posts/${id}`)
|
||||
},
|
||||
create(payload) {
|
||||
return http.post('/board/posts', payload)
|
||||
},
|
||||
update(id, payload) {
|
||||
return http.put(`/board/posts/${id}`, payload)
|
||||
},
|
||||
remove(id) {
|
||||
return http.delete(`/board/posts/${id}`)
|
||||
},
|
||||
tags() {
|
||||
return http.get('/board/tags')
|
||||
},
|
||||
tagGroups() {
|
||||
return http.get('/board/tag-groups')
|
||||
},
|
||||
addComment(id, content) {
|
||||
return http.post(`/board/posts/${id}/comments`, { content })
|
||||
},
|
||||
removeComment(commentId) {
|
||||
return http.delete(`/board/comments/${commentId}`)
|
||||
},
|
||||
block(id, reason) {
|
||||
return http.post(`/board/posts/${id}/block`, { reason })
|
||||
},
|
||||
unblock(id) {
|
||||
return http.post(`/board/posts/${id}/unblock`)
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user