Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

API Document

NamJoon Lee edited this page Jul 8, 2021 · 1 revision

User 관련 API


회원가입 API 명세서

URL : http://localhost:5000/users/signup [POST]

Header : 없음

Body :

{
    "name": 이름(string),
    "email": 이메일(string),
    "password": 비밀번호(string) - 최소 5자 이상
    "profileImage": 이미지
    "phoneNumber":  핸드폰번호(string),
    "major": 전공(string),
    "university": 대학(string),
    "description": 설명(string)
}

정상 반환 값 :

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/3a102257-7014-4f6b-9cf5-42f893d885c7/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182626Z&X-Amz-Expires=86400&X-Amz-Signature=584f5fdf5df05e3a5308fe07bfd47720a644d475668f678e60add6ac3442b755&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22


로그인 API 명세서

URL : http://localhost:5000/users/signin [POST]

Header : 없음

Body : {

"email": 이메일(string),

"password": 패스워드(string)

}

정상 반환 값 :

{

"token" : 토큰 값(string),

"userInfo": {

"로그인 유저 정보"

}

}


회원탈퇴 API 명세서

URL : http://localhost:5000/users/deleteUser [DELETE]

Header: Authenticate - Bearer 토큰값

ex) Postman 예시

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/d67b840d-7e65-4b29-8a62-85134f307e6e/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182648Z&X-Amz-Expires=86400&X-Amz-Signature=060c9d4219c52b99d55ab29f90b6ea98ba5f8e8afaf89261630f0231d9678c28&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22

Body : 없음

정상 반환 값 :

{

"success" : true,

"message" : "정상적으로 유저가 삭제되었습니다."

}


유저 정보 업데이트 API 명세서

URL : http://localhost:5000/users/updateUserInfo [PUT]

Header: Authenticate - Bearer 토큰값

Body : {

"업데이트 필드" : "업데이트 값"

( 업데이트 사항이 많을 경우 필드 여러개 )

}

정상 반환 값 :

{

"success": true,

"message" : "성공적으로 유저 정보가 업데이트 되었습니다."

}


포트폴리오 전체 조회 API 명세서

URL : http://localhost:5000/users/getPortfolios [GET]

정상 반환 값 :

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/aa64a5e7-bea7-45d4-993e-f1b48e049fd9/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182719Z&X-Amz-Expires=86400&X-Amz-Signature=abb979c45a3be8dfe69130531a77aefa05fd1d044122af66a095c3519a331c2b&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22


포트폴리오 세부 조회 API 명세서

URL : http://localhost:5000/users/detailPortfolio/:id [GET]

정상 반환 값 :

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/4eabe9e7-df98-4860-8270-91dc582b9e92/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182745Z&X-Amz-Expires=86400&X-Amz-Signature=377f2cad9fbebe512ed306f8ad36a44b3be52b3d80a89f2e0cd2c5bc05a02d59&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22


Project 관련 API

Project 스키마 구조

const projectSchema = mongoose.Schema({

title: {     //프로젝트 타이틀
	type: String,
	maxlength: 100
},
participant: { //프로젝트 참여원
	type: String
},
thumbnail: { //대표이미지 (노드에서 스트링 -> 이미지 변환 작업 중)
	type: String
},
role: { //프로젝트에 필요한 역할
	type: String
},
explanation: { //프로젝트 설명
	type: String,
	maslength: 1000
},
	user_id: { //유저 id
	type: String,
}

})

Project list 조회 API

URL : http://localhost:5000/projects/lists [GET]

Header : 없음

Body : 없음

response

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/1f7d21ce-570c-4e69-84dd-dd3752d87edc/_2021-05-22__5.28.20.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182810Z&X-Amz-Expires=86400&X-Amz-Signature=ebe80773c71e88906d82a0ca663f430363aefdefe7959f9b101fea9069fe99b3&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-05-22__5.28.20.png%22


Project create API

URL : http://localhost:5000/projects/create [POST]

Header : Authorization - Bearer 토큰값

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/463902c8-2095-46bc-ad8a-b03bb5c52460/_2021-06-17__2.38.52.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182837Z&X-Amz-Expires=86400&X-Amz-Signature=cfce3e0ab82818e110f03830ab1e24529c35ee61be3c5db7fad532e8a53495a9&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-17__2.38.52.png%22

Body :

{

"title": "second",

"participant": "second",

"endDate": "2021-06-22",

"thumbnail": "second",

"role": "second"

}

response

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/91549f52-d895-4a90-ba02-6ea2f4271211/_2021-05-22__5.33.02.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182851Z&X-Amz-Expires=86400&X-Amz-Signature=7e727c57457288b2d7ee59c775bce392c9bf8b5f9bb1667fc35371d1bd6363f0&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-05-22__5.33.02.png%22


Project detail 조회 API

URL : http://localhost:5000/projects/lists/<id값> [GET]

ex) http://localhost:5000/projects/lists/60a546590bdeaa67938a4887

Header : 없음

Body : 없음

response

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/89a6590c-e112-437a-aa6e-1ac2b28d02c1/_2021-05-22__5.36.11.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182905Z&X-Amz-Expires=86400&X-Amz-Signature=43415effb01cc952dbb5427958b2fb5014d82c55d091d421c2d6648503553c91&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-05-22__5.36.11.png%22

→ id값에 해당하는 객체만 조회


해당 User의 Projects 조회 API

URL : http://localhost:5000/projects/<user_id값> [GET]

ex) http://localhost:5000/projects/lists/60a546590bdeaa67938a4887

Header : 없음

Body : 없음

response

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/89a6590c-e112-437a-aa6e-1ac2b28d02c1/_2021-05-22__5.36.11.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182922Z&X-Amz-Expires=86400&X-Amz-Signature=6791d27c4db519e82fa4bc467fd304a7c246297b49f2ae761ea431d3341f4b11&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-05-22__5.36.11.png%22

→ id값에 해당하는 객체만 조회


Project update API (부분 수정 가능)

URL : http://localhost:5000/projects/<id값> [PATCH]

ex) http://localhost:5000/projects/60a546590bdeaa67938a4887

Header : Authorization - Bearer 토큰값

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/463902c8-2095-46bc-ad8a-b03bb5c52460/_2021-06-17__2.38.52.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182943Z&X-Amz-Expires=86400&X-Amz-Signature=9e8404d0c68749d594fc47f99609beb26dd856512e11b0dafdb3a10fb971dd64&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-17__2.38.52.png%22

Body : (수정을 원하는 부분만 수정할 수도 있음)

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/3f0ff3e3-9dbf-4ece-afb0-c4e791cc5e42/_2021-05-22__5.41.29.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T182957Z&X-Amz-Expires=86400&X-Amz-Signature=ec298808192ef5a50df5b8e761dc38edba850eb806689b7f29a9e4b2d0c60022&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-05-22__5.41.29.png%22

response

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/4b9894a1-d30e-4add-b38f-f2e61c12d665/_2021-05-22__5.49.50.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183011Z&X-Amz-Expires=86400&X-Amz-Signature=6dc7a1a5af37fad23f9c51a90e0a315a93d5ec64530ba9fde8bce8718f5af3c8&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-05-22__5.49.50.png%22


Project delete API

URL : http://localhost:5000/projects/delete/<id값> [DELETE]

ex) http://localhost:5000/projects/delete/60a546590bdeaa67938a4887

Header : Authorization - Bearer 토큰값

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/463902c8-2095-46bc-ad8a-b03bb5c52460/_2021-06-17__2.38.52.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183024Z&X-Amz-Expires=86400&X-Amz-Signature=e94436f9a4d39537aaf9d1b6020df54a1b34598b898898d685b54051acd9a503&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-17__2.38.52.png%22

Body : 없음

→ 삭제 후 전체 조회한 결과 (해당 객체 삭제 된 것 확인)

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/acf617f4-54a1-4bf4-90d9-3c3c4d745c35/_2021-05-22__5.54.31.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183038Z&X-Amz-Expires=86400&X-Amz-Signature=93a1dac0a3997353da645a7d4cdc4e50f42683063c4836ae2ab5f512ce8368e7&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-05-22__5.54.31.png%22


Contest 관련 API

Contest 스키마 구조

// 포지션
const positionSchema = mongoose.Schema({
    positionName: { // 포지션 이름
        type: String,
        default: ""
    },
    recruitNumbers: { // 모집 인원
        type: Number,
        default: 0
    },
    applyNumbers: { // 신청 인원
        type: Number,
        default: 0
    },
    applyMembers: { // 신청 인원 목록
        type: Array,
        default: []
    },
    confirmedNumbers: { // 승인 인원
        type: Number,
        default: 0
    },
    confirmedMembers: { // 숭인 인원 목록
        type: Array,
        default: []
    }
});

// 공모전 글
const contestSchema = mongoose.Schema({
    contestName: { // 공모전 이름
        type: String,
        maxlength: 50
    },
    hitCount: { // 조회수
        type: Number,
        default: 0
    },
    title: { // 게시글 제목
        type: String,
        maxlength: 50
    },
    author: { // 작성자
        type: String
    },
    postDate: { // 등록일자
        type: Date,
        default: Date.now
    },
    deadLine: { // 마감일자
        type: Date,
        default: Date.now
    },
    detail: { // 세부사항
        type: String
    },
    poster: { // 공모전 포스터
        type: String
    },
    category: { // 공모전 카테고리
        type: String,
        default: "",
    },
    organizer: { // 주최기관
        type: String,
        maxlength: 100
    },
    closingStatus: { // 모집 마감여부
        type: Boolean,
        default: false
    },
    totalMembers: { // 전체 모집 인원
        type: Number,
        default: 0
    },
    applyStatus: { // 신청 현황
        totalApplyNumbers: { // 전체 신청 인원
            type: Number,
            default: 0
        },
        totalConfirmedNumbers: { // 전체 승인 인원
            type: Number,
            default: 0
        }
    },
    positions: [positionSchema]
});

Contest list 조회 API

URL : http://localhost:5000/contests/lists [GET]

Header : 없음

Body : 없음

Response : 200 OK

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/b1f1d210-e3c9-475c-a5e3-6c29b2501032/_2021-06-04__9.48.17.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183057Z&X-Amz-Expires=86400&X-Amz-Signature=1667155f953816cd8fdeb32ade5b89a5ba1d37c239775c45014042a80e7fc139&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-04__9.48.17.png%22


Contest create API

URL : http://localhost:5000/contests/create [POST]

Header : Authentication - Bearer 토큰값

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/326cd60c-f67c-4ba5-85fb-5b47b93f85fd/_2021-06-16__4.32.21.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183115Z&X-Amz-Expires=86400&X-Amz-Signature=0ef6d719109ed3d376faf86bffe744bd4ad544e61e7a53f952c4ee97d7fcbd6e&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-16__4.32.21.png%22

Request Body :

{
    "contestName": "111yee111",
    "title": "222yee222",
    "author": "ningpop",
    "deadLine": "2018-03-29T00:00:00.000Z",
    "detail": "333yee333",
    "poster": "https://www.naver.com",
    "category": "IT,hackathon",
    "organizer": "likelion",
    "totalMembers": 5,
    "positions": [
        {
            "positionName": "Back-end",
            "recruitNumbers": 2
        },
        {
            "positionName": "Front-end",
            "recruitNumbers": 2
        },
        {
            "positionName": "Designer",
            "recruitNumbers": 1
        }
    ]
}

Response : 201 Created

{
    "applyStatus": {
        "totalApplyNumbers": 1,
        "totalConfirmedNumbers": 0
    },
    "hitCount": 0,
    "supportScale": "150억원",
    "category": "IT,hackathon",
    "homepage": "minsgy.dev",
    "closingStatus": false,
    "totalMembers": 5,
    "positions": [
        {
            "positionName": "Back-end",
            "recruitNumbers": 2,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": []
        },
        {
            "positionName": "Front-end",
            "recruitNumbers": 2,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": []
        },
        {
            "positionName": "Designer",
            "recruitNumbers": 1,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": []
        }
    ],
    "_id": "60ccaf2e4be408da861272aa",
    "contestName": "qqqqqqqqqqqqqq111yee111",
    "title": "222yee222",
    "author": "ningpop",
    "deadLine": "2018-03-29T00:00:00.000Z",
    "detail": "333yee333",
    "poster": "https://www.naver.com",
    "organizer": "likelion",
    "postDate": "2021-06-18T14:35:26.624Z",
    "__v": 0
}

Contest detail 조회 API

URL : http://localhost:5000/contests/detail/<id값> [GET]

ex) http://localhost:5000/contests/detail/60ba226c79c95e01b5d620f1

Header : 없음

Body : 없음

Response : 200 OK

{
    "applyStatus": {
        "totalApplyNumbers": 0,
        "totalConfirmedNumbers": 0
    },
    "hitCount": 0,
    "supportScale": "150억원",
    "category": "IT,hackathon",
    "homepage": "minsgy.dev",
    "closingStatus": false,
    "totalMembers": 5,
    "_id": "60ccd6e5f1e9b007401df731",
    "contestName": "qqqqqqqqqqqqqq111yee111",
    "title": "222yee222",
    "author": "ningpop",
    "deadLine": "2018-03-29T00:00:00.000Z",
    "detail": "333yee333",
    "poster": "https://www.naver.com",
    "organizer": "likelion",
    "postDate": "2021-06-18T17:24:53.823Z",
    "positions": [
        {
            "positionName": "Front-end",
            "recruitNumbers": 2,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": [],
            "_id": "60ccd6e5f1e9b007401df733"
        },
        {
            "positionName": "Designer",
            "recruitNumbers": 1,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": [],
            "_id": "60ccd6e5f1e9b007401df734"
        },
        {
            "positionName": "Back-end",
            "recruitNumbers": 2,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": [],
            "_id": "60ccd6e5f1e9b007401df732"
        }
    ],
    "__v": 3
}

→ id값에 해당하는 객체만 조회

→ Detail 조회시마다 Contest의 조회수(hitCount) 1씩 증가


Contest update API (부분 수정 가능)

URL : http://localhost:5000/contests/<id값> [PATCH]

ex) http://localhost:5000/contests/60ba226c79c95e01b5d620f1

Header : Authentication - Bearer 토큰값

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/326cd60c-f67c-4ba5-85fb-5b47b93f85fd/_2021-06-16__4.32.21.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183130Z&X-Amz-Expires=86400&X-Amz-Signature=f03fe7d39cf7c197a7b53067d9092f8dfd12b5cfd042884744f55d75437f39fb&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-16__4.32.21.png%22

Body : 원하는 부분만 수정 가능

  • 수정 가능 필드 (클릭해서 열기)
    • contestName : 공모전 이름
    • title : 게시글 제목
    • deadLine : 마감일자
    • detail : 세부사항
    • poster : 포스터 이미지 링크
    • category : 공모전 카테고리(array)
    • organizer : 주최기관
    • totalMembers : 전체 모집 인원

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/2b9f0b2e-1a94-49df-b29e-4ee01a1134eb/_2021-06-04__9.58.46.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183149Z&X-Amz-Expires=86400&X-Amz-Signature=27522d91227dec6f34573715a013ee583ad9a9c4598c063f019fef6727d12b2f&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-04__9.58.46.png%22

Response : 200 OK

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/dff0c02a-44ed-400b-b68a-1e548b3d02df/_2021-06-04__9.59.04.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183200Z&X-Amz-Expires=86400&X-Amz-Signature=2344e825e4a7dd1dcbed3aa398ca29077e79edf78b01287a4b70412d17142f55&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-04__9.59.04.png%22


Contest delete API

URL : http://localhost:5000/contests/delete/<id값> [DELETE]

ex) http://localhost:5000/contests/delete/60ba226c79c95e01b5d620f1

Header : Authentication - Bearer 토큰값

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/326cd60c-f67c-4ba5-85fb-5b47b93f85fd/_2021-06-16__4.32.21.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183216Z&X-Amz-Expires=86400&X-Amz-Signature=3321f361ce01f6fd9a85eefbc95df2d381e8e09fe1adf5d8102536220b6d3903&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-16__4.32.21.png%22

Body : 없음

Response : 204 No Content


Contest 참가 API

URL : http://localhost:5000/contests/participate/<id값> [PATCH]

ex) http://localhost:5000/contests/participate/60ba268279c95e01b5d620f2

Header : Authentication - Bearer 토큰값

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/326cd60c-f67c-4ba5-85fb-5b47b93f85fd/_2021-06-16__4.32.21.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183231Z&X-Amz-Expires=86400&X-Amz-Signature=80038514b8e479358bdac4a75096acb97afb935f1fd5f9acb812dd3d87fd34a8&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-16__4.32.21.png%22

Body :

{
    "positionName": "Back-end",
    "volunteer": "ningpoppppp"
}

Response : 200 OK

{
    "applyStatus": {
        "totalApplyNumbers": 2,
        "totalConfirmedNumbers": 1
    },
    "hitCount": 0,
    "supportScale": "150억원",
    "category": "IT,hackathon",
    "homepage": "minsgy.dev",
    "closingStatus": false,
    "totalMembers": 5,
    "_id": "60ccd6e5f1e9b007401df731",
    "contestName": "qqqqqqqqqqqqqq111yee111",
    "title": "222yee222",
    "author": "ningpop",
    "deadLine": "2018-03-29T00:00:00.000Z",
    "detail": "333yee333",
    "poster": "https://www.naver.com",
    "organizer": "likelion",
    "postDate": "2021-06-18T17:24:53.823Z",
    "positions": [
        {
            "positionName": "Front-end",
            "recruitNumbers": 2,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": [],
            "_id": "60ccd6e5f1e9b007401df733"
        },
        {
            "positionName": "Designer",
            "recruitNumbers": 1,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": [],
            "_id": "60ccd6e5f1e9b007401df734"
        },
        {
            "positionName": "Back-end",
            "recruitNumbers": 2,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": [],
            "_id": "60ccd6e5f1e9b007401df732"
        }
    ],
    "__v": 3
}

Contest 팀원 승인 API

URL : http://localhost:5000/contests/confirmMember/<id값> [PATCH]

ex) http://localhost:5000/contests/confirmMember/60ba268279c95e01b5d620f2

Header : Authentication - Bearer 토큰값

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/326cd60c-f67c-4ba5-85fb-5b47b93f85fd/_2021-06-16__4.32.21.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210708%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210708T183245Z&X-Amz-Expires=86400&X-Amz-Signature=674ec57897fcd573873ad0acf4d22d70ec7945e80db063d5559f6721ab079289&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22_2021-06-16__4.32.21.png%22

Body :

{
    "positionName": "Back-end",
    "volunteer": "qwerqwer"
}

Response : 201 Created

{
    "applyStatus": {
        "totalApplyNumbers": 2,
        "totalConfirmedNumbers": 1
    },
    "hitCount": 0,
    "supportScale": "150억원",
    "category": "IT,hackathon",
    "homepage": "minsgy.dev",
    "closingStatus": false,
    "totalMembers": 5,
    "_id": "60ccd6e5f1e9b007401df731",
    "contestName": "qqqqqqqqqqqqqq111yee111",
    "title": "222yee222",
    "author": "ningpop",
    "deadLine": "2018-03-29T00:00:00.000Z",
    "detail": "333yee333",
    "poster": "https://www.naver.com",
    "organizer": "likelion",
    "postDate": "2021-06-18T17:24:53.823Z",
    "positions": [
        {
            "positionName": "Front-end",
            "recruitNumbers": 2,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 0,
            "confirmedMembers": [],
            "_id": "60ccd6e5f1e9b007401df733"
        },
        {
            "positionName": "Designer",
            "recruitNumbers": 1,
            "applyNumbers": 1,
            "applyMembers": [
                "ningpoppppp"
            ],
            "confirmedNumbers": 0,
            "confirmedMembers": [],
            "_id": "60ccd6e5f1e9b007401df734"
        },
        {
            "positionName": "Back-end",
            "recruitNumbers": 2,
            "applyNumbers": 0,
            "applyMembers": [],
            "confirmedNumbers": 1,
            "confirmedMembers": [
                "qwerqwer"
            ],
            "_id": "60ccd6e5f1e9b007401df732"
        }
    ],
    "__v": 3
}

→ 승인 시 memberList(승인된 유저)에 추가되고 membersNum(현재 팀원 수)은 1 증가


Contest 특정 user가 참여한 contest list 불러오기 API

URL : http://localhost:5000/contests/user/contestlist/<user의 id값> [GET]

ex) http://localhost:5000/contests/user/contestlist/60a528c56d86c42f18bc952c

Header : 없음

Body : 없음

Response : 200 OK

[
    {
        "applyStatus": {
            "totalApplyNumbers": 0,
            "totalConfirmedNumbers": 1
        },
        "hitCount": 1,
        "supportScale": "150억원",
        "category": "IT,hackathon",
        "homepage": "minsgy.dev",
        "closingStatus": false,
        "totalMembers": 5,
        "_id": "60cce5255cdd360ccba6594e",
        "contestName": "민스기 놀리기",
        "title": "민스기 놀리기 공모전 참가하실 분 찾아요",
        "author": "ningpop",
        "deadLine": "2018-03-29T00:00:00.000Z",
        "detail": "민스기민스기민스기민스기",
        "poster": "https://noticon-static.tammolo.com/dgggcrkxq/image/upload/v1580888106/noticon/owcvyw4dggdylen2ql5w.gif",
        "organizer": "likelion",
        "postDate": "2021-06-18T18:25:41.174Z",
        "positions": [
            {
                "positionName": "Back-end",
                "recruitNumbers": 2,
                "applyNumbers": 0,
                "applyMembers": [],
                "confirmedNumbers": 1,
                "confirmedMembers": [
                    "test1@naver.com"
                ],
                "_id": "60cce5255cdd360ccba6594f"
            },
            {
                "positionName": "Front-end",
                "recruitNumbers": 2,
                "applyNumbers": 0,
                "applyMembers": [],
                "confirmedNumbers": 0,
                "confirmedMembers": [],
                "_id": "60cce5255cdd360ccba65950"
            },
            {
                "positionName": "Designer",
                "recruitNumbers": 1,
                "applyNumbers": 0,
                "applyMembers": [],
                "confirmedNumbers": 0,
                "confirmedMembers": [],
                "_id": "60cce5255cdd360ccba65951"
            }
        ],
        "__v": 0
    },
    {
        "applyStatus": {
            "totalApplyNumbers": 0,
            "totalConfirmedNumbers": 1
        },
        "hitCount": 0,
        "supportScale": "150억원",
        "category": "IT,hackathon",
        "homepage": "minsgy.dev",
        "closingStatus": false,
        "totalMembers": 5,
        "_id": "60cce5a65cdd360ccba6595a",
        "contestName": "율희공주 놀리기",
        "title": "율희공주 놀리기 공모전 참가하실 분 찾아요",
        "author": "ningpop",
        "deadLine": "2018-03-29T00:00:00.000Z",
        "detail": "김두부김두부김두부김두부",
        "poster": "https://noticon-static.tammolo.com/dgggcrkxq/image/upload/v1617087525/noticon/uedixpon6rcvcqbtuf0c.gif",
        "organizer": "likelion",
        "postDate": "2021-06-18T18:27:50.689Z",
        "positions": [
            {
                "positionName": "Back-end",
                "recruitNumbers": 2,
                "applyNumbers": 0,
                "applyMembers": [],
                "confirmedNumbers": 0,
                "confirmedMembers": [],
                "_id": "60cce5a65cdd360ccba6595b"
            },
            {
                "positionName": "Front-end",
                "recruitNumbers": 2,
                "applyNumbers": 0,
                "applyMembers": [],
                "confirmedNumbers": 1,
                "confirmedMembers": [
                    "test1@naver.com"
                ],
                "_id": "60cce5a65cdd360ccba6595c"
            },
            {
                "positionName": "Designer",
                "recruitNumbers": 1,
                "applyNumbers": 0,
                "applyMembers": [],
                "confirmedNumbers": 0,
                "confirmedMembers": [],
                "_id": "60cce5a65cdd360ccba6595d"
            }
        ],
        "__v": 0
    }
]