feat(userMgr): add list users endpoint

Add new endpoint `/userMgr/list` to retrieve all users with superuser permission. Includes handler implementation, database query function, and API documentation update.
This commit is contained in:
2026-03-04 11:20:01 +08:00
parent 8f901dac08
commit 783b06ff94
5 changed files with 95 additions and 18 deletions
+35
View File
@@ -215,6 +215,41 @@ X-Timestamp: 1704067200000
---
## List Users
**Endpoint**: `/userMgr/list`
**Method**: GET
**Auth Required**: Yes (token)
**Permission Level**: Superuser
**Request Headers**:
```
X-Token: your_token
X-Timestamp: 1704067200000
```
**Response**:
```json
{
"success": true,
"message": "User list retrieved successfully",
"data": [
{
"userID": 1,
"username": "admin",
"type": "superuser"
},
{
"userID": 2,
"username": "new_user",
"type": "admin"
}
]
}
```
---
## Create frpc Instance
**Endpoint:** `/frpcAct/instanceMgr/create`