Skip to content

woozco/Woozco_BE

Repository files navigation

Woozco_BE

API Docs

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

auth/

[POST] /api/auth/login

user login

req.body

{
  "email": "[email protected]",
  "password": "testpassword"
}

res.body

{
    "access_token": [TOKEN]
}

[POST] /api/auth/register

user register

req.body

{
  "name": "조성연",
  "email": "[email protected]",
  "password": "testpassword"
}

res.body

Add user 조성연

[POST] /api/auth/changepw

change password (need Authorization header)

req.body

{
  "password": "testpassword1"
}

res.body

Change password for 조성연

[GET] /api/auth/profile

get user profile (need Authorization header)

res.body

{
    "sub": "[email protected]",
    "username": "조성연",
    "iat": 1695532333, // issued time for token
    "exp": 1695534133  // expire time for token
}

[POST] /api/auth/verifymail

send email verify code

req.body

{
    "email": "[email protected]"
}

res.body

[POST] /api/auth/confirm-verifyemail

confirm verify code

req.body

{
    "verifyCode": 844345
}

res.body

이메일 인증 완료

board/

[GET] /api/board/all

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": "예제 내용입니다."
    },
]

[POST] /api/board/create

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] /api/board/:id/delete

delete the board corresponding to the id

No response except status code(204)

[POST] /api/board/:id/update

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": "예제 내용입니다."
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages