Method | URI | Description |
---|---|---|
POST | /api/auth/login | user login |
POST | /api/auth/register | user register |
POST | /api/auth/changepw | change password |
POST | /api/auth/verifymail | send email verify code |
POST | /api/auth/confirm-verifyemail | confirm verify code |
GET | /api/board/all | get all board |
POST | /api/board/create | create board |
DELETE | /api/board/:id/delete | delete board |
POST | /api/board/:id/update | change board |
user login
req.body
{
"email": "[email protected]",
"password": "testpassword"
}
res.body
{
"access_token": [TOKEN]
}
user register
req.body
{
"name": "조성연",
"email": "[email protected]",
"password": "testpassword"
}
res.body
Add user 조성연
change password (need Authorization header)
req.body
{
"password": "testpassword1"
}
res.body
Change password for 조성연
get user profile (need Authorization header)
res.body
{
"sub": "[email protected]",
"username": "조성연",
"iat": 1695532333, // issued time for token
"exp": 1695534133 // expire time for token
}
send email verify code
req.body
{
"email": "[email protected]"
}
res.body
confirm verify code
req.body
{
"verifyCode": 844345
}
res.body
이메일 인증 완료
get all board
res.body
[
{
"id": 3,
"type": "mentee",
"title": "예제 제목",
"date": "2023-10-03",
"startTime": "09:00 AM",
"endTime": "11:00 AM",
"linkOfProblem": "https://example.com/problem",
"wantLanguage": "Python",
"body": "예제 내용입니다."
},
{
"id": 4,
"type": "mentee",
"title": "예제 제목",
"date": "2023-10-03",
"startTime": "09:00 AM",
"endTime": "11:00 AM",
"linkOfProblem": "https://example.com/problem",
"wantLanguage": "Python",
"body": "예제 내용입니다."
},
]
create board
req.body
{
"id": 2,
"type": "mentee", // 또는 "mentor"
"title": "예제 제목",
"date": "2023-10-03",
"startTime": "09:00 AM",
"endTime": "11:00 AM",
"linkOfProblem": "https://example.com/problem",
"wantLanguage": "Python",
"body": "예제 내용입니다."
}
res.body
{
"id": 2,
"type": "mentee", // 또는 "mentor"
"title": "예제 제목",
"date": "2023-10-03",
"startTime": "09:00 AM",
"endTime": "11:00 AM",
"linkOfProblem": "https://example.com/problem",
"wantLanguage": "Python",
"body": "예제 내용입니다."
}
delete the board corresponding to the id
No response except status code(204)
update the board corresponding to thd id
req.body
{
"id": 2,
"type": "mentor",
"title": "예제 제목",
"date": "2023-10-03",
"startTime": "09:00 AM",
"endTime": "11:00 AM",
"linkOfProblem": "https://example.com/problem",
"wantLanguage": "Python",
"body": "예제 내용입니다."
}
res.body
{
"id": 2,
"type": "mentor",
"title": "예제 제목",
"date": "2023-10-03",
"startTime": "09:00 AM",
"endTime": "11:00 AM",
"linkOfProblem": "https://example.com/problem",
"wantLanguage": "Python",
"body": "예제 내용입니다."
}