-
Notifications
You must be signed in to change notification settings - Fork 5
USER API
Kwon soon won edited this page Nov 3, 2020
·
1 revision
| METHOD | URL | DESCRIPITION |
|---|---|---|
| GET | /api/user | 유저 전체 목록 가져오기 |
| POST | /api/user | 유저 생성 |
| PATCH | /api/user/:userId | 유저 imageUrl, name 업데이트 |
| DELETE | /api/user/:userId | 유저 삭제하기 |
GET /api/user[
{
"id": 1,
"email": "kyle@example.com",
"imageUrl": null,
"name": null,
"createdAt": "2020-11-03T09:24:06.000Z",
"updatedAt": "2020-11-03T09:24:06.000Z"
},
{
"id": 2,
"email": "suckstar@example.com",
"imageUrl": null,
"name": null,
"createdAt": "2020-11-03T09:24:06.000Z",
"updatedAt": "2020-11-03T09:24:06.000Z"
},
]
POST /api/user/:userId| NAME | TYPE | DESCRIPITION | REQUIRED |
|---|---|---|---|
| String | user email | O | |
| imageUrl | String | user profile image | X |
| name | String | user name | X |
{
"email":"abc@a.com",
"imageUrl":null,
"name":"abc"
}
{
"id": 5,
"email": "abc@a.com",
"imageUrl": null,
"name": "abc",
"updatedAt": "2020-11-03T13:33:56.106Z",
"createdAt": "2020-11-03T13:33:56.106Z"
}
PATCH /api/user/:userId| NAME | TYPE | DESCRIPITION | REQUIRED |
|---|---|---|---|
| imageUrl | String | user profile image | X |
| name | String | user name | X |
{
"imageUrl":null,
"name":"abc"
}
{
"numOfaffectedRows":1
}
DELETE /api/user/:userId{
"numOfaffectedRows":1
}