generated from team-B-free/express-typescript-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 5
구현 : users
오주환 edited this page Jul 29, 2022
·
1 revision
users 에 대한 상세 구현 문서입니다.
기능 목록
- 회원가입
- 회원 로그인
- 회원정보 수정
- 회원탈퇴
- 회원 정보 상세 조회
POST http://localhost:3000/api/users/register
{
"name" : "삐룸",
"email" : "[email protected]",
"password" : "1234"
}
{
"status": 200,
"isSuccess": true,
"message": "성공"
}
- password : 공백불가, 영문/숫자/특수문자 1개씩 포함되어있는 6자 이상 12자 이하의 비밀번호
POST http://localhost:3000/api/users/login
{
"email" : "[email protected]",
"password" : "1234"
}
{
"status": 200,
"isSuccess": true,
"accessToken": "abcdef"
}
- email: 공백불가, @ 필수 포함
PATCH http://localhost:3000/api/users
{
"name" : "삐룸",
"password" : "1234",
"department" : "개발2팀"
}
{
"status": 200,
"isSuccess": true,
"message": "성공"
}
- department: 영어 불가능
DELETE http://localhost:3000/api/users
{
"status": 200,
"isSuccess": true,
"message": "성공"
}
GET http://localhost:3000/api/users/1
{
"status": 200,
"isSuccess": true,
"message": "성공",
"data" : {"name" : "삐룸", "email" : "[email protected]", "department" : "개발2팀"}
}