feat(user): add user type modification endpoint
- Implement new endpoint `/userMgr/modifyType` for updating user types - Add database function DBUpdateUserType to handle type updates - Include request validation and proper error handling - Update API documentation with new endpoint details
This commit is contained in:
+32
@@ -277,6 +277,38 @@ X-Timestamp: 1704067200000
|
||||
|
||||
---
|
||||
|
||||
## Modify User Type
|
||||
|
||||
**Endpoint**: `/userMgr/modifyType`
|
||||
**Method**: POST
|
||||
**Content-Type**: application/json
|
||||
**Auth Required**: Yes (token)
|
||||
**Permission Level**: Superuser
|
||||
|
||||
**Request Headers**:
|
||||
```
|
||||
X-Token: your_token
|
||||
X-Timestamp: 1704067200000
|
||||
```
|
||||
|
||||
**Request Body**:
|
||||
```json
|
||||
{
|
||||
"userID": 2,
|
||||
"newType": "superadmin"
|
||||
}
|
||||
```
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"message": "User type updated successfully"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## List Users
|
||||
|
||||
**Endpoint**: `/userMgr/list`
|
||||
|
||||
Reference in New Issue
Block a user