router.get('/api/user/:uid/solvedList', access, wrap(getScore));
router.get('/api/user/me', access, getMe);
router.get('/api/user/:uid', access, isAdmin, getSpecificUser);
router.patch('/api/user/:uid', access, isAdmin, modifyUser);
router.get('/api/user', access, isAdmin, getUser);
router.post('/api/user', access, isAdmin, addUser);
router.post('/api/user/admin', access, isAdmin, addUserForAdmin);
- accessToken: String (Required); Bearer Token
- RefreshToken: String (Required); JWT Token
- uid: Number (Required)
{
"success": true,
"uid": "37",
"user": {
"id": 36,
"solved": 3,
"pscore": 1479,
"rank": null,
"solvedAt": "2021-08-08T13:11:47.000Z",
"uid": 37
},
"result": [
{
"pid": 27,
"name": "문제용",
"issuer": "RokLcw"
},
{
"pid": 20,
"name": "문제 파일 있음",
"issuer": "이지금"
}
]
}
{
"success": false,
"message": "You don't have permission to access this page."
}
- accessToken: String (Required); Bearer Token
- RefreshToken: String (Required); JWT Token
{
"success": true,
"user": [
{
"uid": Number,
"nickname": String,
"email": String,
"isAdmin": Boolean,
"banUser": Boolean,
"name": String
},
{
"uid": Number,
"nickname": String,
"email": String,
"isAdmin": Boolean,
"banUser": Boolean,
"name": String
}
]
}
{
"success": false,
"err": err
}
{
"success": false,
"message": "Login required"
}
- accessToken: String (Required); Bearer Token
- RefreshToken: String (Required); JWT Token
{
"success": true,
"user": {
"uid": Number,
"nickname": String,
"email": String,
"isAdmin": Boolean,
"banUser": Boolean,
"name": String
}
}
{
"success": false,
"err": err
}
{
"success": false,
"message": "Login required"
}
- accessToken: String (Required); Bearer Token
- RefreshToken: String (Required); JWT Token
- uid: Number (Required)
{
"success": true,
"user": {
"uid": Number,
"nickname": String,
"email": String,
"isAdmin": Boolean,
"banUser": Boolean,
"name": String
}
}
{
"success": false,
"err": err
}
{
"success": false,
"message": "Login required"
}
- accessToken: String (Required); Bearer Token
- RefreshToken: String (Required); JWT Token
{
"success": true,
"user": {
"uid": Number,
"nickname": String,
"email": String,
"isAdmin": Boolean,
"banUser": Boolean,
"name": String
}
}
{
"success": false,
"err": err
}
{
"success": false,
"message": "Login required"
}
It exists because the membership method of general users and managers is different.
- accessToken: String (Required); Bearer Token
- RefreshToken: String (Required); JWT Token
{
"success": true,
"user": {
"uid": Number,
"nickname": String,
"email": String,
"isAdmin": Boolean,
"banUser": Boolean,
"name": String
}
}
{
"success": false,
"err": err
}
{
"success": false,
"message": "Login required"
}
- accessToken: String (Required); Bearer Token
- RefreshToken: String (Required); JWT Token
- uid: Number (Required)
- nickname: String (Required)
- email: String (Required)
- password: String (Required)
- isAdmin: Boolean (Required)
- banUser: Boolean (Required)
- name: String (Required)
{
"success": true,
"user": {
"uid": Number,
"nickname": String,
"email": String,
"isAdmin": Boolean,
"banUser": Boolean,
"name": String
}
}
{
"success": false,
"err": err
}
{
"success": false,
"message": "Login required"
}