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:
2026-03-30 14:22:15 +08:00
parent 67bea968c6
commit 4aa58b2f3d
4 changed files with 88 additions and 1 deletions
+32
View File
@@ -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`