ca66c1d53e
CI / build (push) Failing after 13m27s
- UserAvatar 컴포넌트(커스텀>구글>이니셜, 로드 실패 시 이니셜 폴백) - 목록: 작성자 아바타 + 추천 수 표기 - 상세: 작성자 아바타, 추천/비추천 토글 버튼(내 투표 강조), 추천자 본문 하단 아바타 10개 + 초과 시 (+N명이 추천했습니다), 클릭 시 전체 목록 모달 - 댓글: 작성자 아바타 + 추천/비추천 버튼 - 계정정보: 포인트 표기(GET /auth/points 최신값) - boardApi.votePost/voteComment/recommenders, authApi.points 추가 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
import http from './http'
|
|
|
|
// 백엔드 /api/auth 엔드포인트와 매핑
|
|
export const authApi = {
|
|
signup(payload) {
|
|
return http.post('/auth/signup', payload)
|
|
},
|
|
signupEnabled() {
|
|
return http.get('/auth/signup-enabled')
|
|
},
|
|
login(payload) {
|
|
return http.post('/auth/login', payload)
|
|
},
|
|
// 구글 로그인/가입 — GIS에서 받은 ID 토큰 전달
|
|
googleLogin(payload) {
|
|
return http.post('/auth/google', payload)
|
|
},
|
|
googleClientId() {
|
|
return http.get('/auth/google-client-id')
|
|
},
|
|
logout() {
|
|
return http.post('/auth/logout')
|
|
},
|
|
me() {
|
|
return http.get('/auth/me')
|
|
},
|
|
changePassword(payload) {
|
|
return http.put('/auth/password', payload)
|
|
},
|
|
// 가입정보 변경 진입 전 비밀번호 재인증
|
|
verifyPassword(password) {
|
|
return http.post('/auth/verify-password', { password })
|
|
},
|
|
// 가입정보(이름/이메일) 변경
|
|
updateProfile(payload) {
|
|
return http.put('/auth/profile', payload)
|
|
},
|
|
// 프로필 사진 변경/해제 — image 가 null/빈값이면 해제(구글 사진으로 폴백)
|
|
updateProfileImage(image) {
|
|
return http.put('/auth/profile-image', { image })
|
|
},
|
|
// 현재 사용자 활동 포인트 (최신값)
|
|
points() {
|
|
return http.get('/auth/points')
|
|
},
|
|
}
|