배포 주소:
.env :
DATABASE_URL=postgresql://favoritephoto_9ppd_user:9AEtR1G0iJPY3OEyXtkE8OLlMKnBaLhE@dpg-d0i2j4umcj7s739kqjn0-a.singapore-postgres.render.com/favoritephoto_9ppd
PORT=3002
JWT_SECRET=your_jwt_secret_key
GOOGLE_CLIENT_ID=733096552-l9keg97gld0625hlmqeaip5r8etpushf.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=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
.http (숨겨져 있음)
### 회원가입
POST <http://localhost:3002/api/auth/signup>
Content-Type: application/json
{
"email": "[email protected]",
"nickname": "성경",
"password": "asdf1234",
"passwordConfirmation": "asdf1234"
}
### 로그인
POST <http://localhost:3002/api/auth/login>
Content-Type: application/json
{
"email": "[email protected]",
"password": "asdf1234"
}
### My gallery 조회
GET <http://localhost:3002/api/users/gallery?search=별>
Content-Type: application/json
Authorization: Bearer 토큰
### 사용자 정보 조회
GET <http://localhost:3002/api/users>
Content-Type: application/json
Authorization: Bearer 토큰
판매등록.http
### 내 포토카드 판매하기 (AVAILABLE)
POST <http://localhost:3002/api/store/cards>
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIwYmVlMjJhMy1iYjViLTQ2MTUtYTg5ZC0zNTc0YTZlY2IyYTUiLCJlbWFpbCI6InF3ZXJAZ21haWwuY29tIiwibmlja25hbWUiOiLsgqzsg53tjKwiLCJpYXQiOjE3NDgzMjg1MzQsImV4cCI6MTc0ODMyOTQzNH0.zdv7HK8sWChibr5nohnfnztCGFKOCgjQ-4EKCscF0KI
Content-Type: application/json
{
"photoCardId": 151,
"userCardIds": [1121],
"salePrice": 9,
"saleQuantity": 1,
"desiredGradeId": 4,
"desiredGenreId": 3,
"desiredDescription": "인물카드 깁미"
}
### 판매 내리기
DELETE <http://localhost:3002/api/store/cards/343>
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIwYmVlMjJhMy1iYjViLTQ2MTUtYTg5ZC0zNTc0YTZlY2IyYTUiLCJlbWFpbCI6InF3ZXJAZ21haWwuY29tIiwibmlja25hbWUiOiLsgqzsg53tjKwiLCJpYXQiOjE3NDgzMjg1MzQsImV4cCI6MTc0ODMyOTQzNH0.zdv7HK8sWChibr5nohnfnztCGFKOCgjQ-4EKCscF0KI
### 판매 수정하기
PATCH <http://localhost:3002/api/store/cards/343>
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIwYmVlMjJhMy1iYjViLTQ2MTUtYTg5ZC0zNTc0YTZlY2IyYTUiLCJlbWFpbCI6InF3ZXJAZ21haWwuY29tIiwibmlja25hbWUiOiLsgqzsg53tjKwiLCJpYXQiOjE3NDgzMjg1MzQsImV4cCI6MTc0ODMyOTQzNH0.zdv7HK8sWChibr5nohnfnztCGFKOCgjQ-4EKCscF0KI
Content-Type: application/json
{
"salePrice": 7,
"saleQuantity": 2,
"desiredGradeId": 4,
"desiredGenreId": 1,
"desiredDescription": "새로운 조건으로 교환 희망"
}
### 교환 요청 API
POST <http://localhost:3002/api/store/cards/34/exchange>
Content-Type: application/json
Authorization: Bearer
{
"offeredUserCardIds": [64],
"description": "이 카드와 교환하고 싶습니다."
}
### 교환 취소 API 여기 id는 트레이드 리퀘스트 아이디
PATCH <http://localhost:3002/api/store/trade/359/cancel>
Authorization: Bearer
### 전체 포토카드 목록 조회
GET <http://localhost:3002/api/store>
Content-Type: application/json
### 특정 포토카드 상세 조회
GET <http://localhost:3002/api/store/cards/50>
Content-Type: application/json
Authorization: Bearer
### 교환 제시 목록 조회 (판매자 입장)
GET <http://localhost:3002/api/store/cards/34/trade-requests>
Authorization: Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIwYmVlMjJhMy1iYjViLTQ2MTUtYTg5ZC0zNTc0YTZlY2IyYTUiLCJlbWFpbCI6InF3ZXJAZ21haWwuY29tIiwibmlja25hbWUiOiLsgqzsg53tjKwiLCJpYXQiOjE3NDg0OTYzMjEsImV4cCI6MTc0ODQ5NzIyMX0.Vuz7VgxM4H6bIye-rjXE5pFbChNFDdKLU0xGhSx4qVw
seed data 이메일 비번
[email protected]
seedpassword