更新 license .github

This commit is contained in:
ryan
2026-06-08 17:25:12 +08:00
parent e3ef6c9d27
commit 85f91b1ed7
122 changed files with 881 additions and 215 deletions
+106
View File
@@ -452,6 +452,81 @@ const docTemplate = `{
}
}
},
"/api/v1/admin/logs": {
"get": {
"security": [
{
"SessionCookie": []
}
],
"description": "分页获取系统历史日志,cursor=0 获取最新日志,cursor\u003e0 获取更早日志",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "获取系统日志",
"parameters": [
{
"type": "integer",
"default": 0,
"description": "日志游标,0=获取最新",
"name": "cursor",
"in": "query"
},
{
"type": "integer",
"default": 200,
"description": "每页条数",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "日志列表",
"schema": {
"allOf": [
{
"$ref": "#/definitions/util.ResponseAny"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/logs.logsResponse"
}
}
}
]
}
},
"401": {
"description": "未登录",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
},
"403": {
"description": "无管理员权限",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
}
}
}
},
"/api/v1/admin/logs/ws": {
"get": {
"description": "通过 WebSocket 实时推送系统日志,需要管理员权限",
"tags": [
"admin"
],
"summary": "系统日志实时推送",
"responses": {}
}
},
"/api/v1/admin/status": {
"get": {
"security": [
@@ -2905,6 +2980,37 @@ const docTemplate = `{
}
}
},
"logger.LogEntry": {
"type": "object",
"properties": {
"data": {
"description": "一行日志原文(含换行符)",
"type": "string"
},
"index": {
"description": "全局递增序号",
"type": "integer"
}
}
},
"logs.logsResponse": {
"type": "object",
"properties": {
"has_more": {
"type": "boolean"
},
"lines": {
"type": "array",
"items": {
"$ref": "#/definitions/logger.LogEntry"
}
},
"next_cursor": {
"description": "用于加载更早日志的 cursor",
"type": "integer"
}
}
},
"model.AccessToken": {
"type": "object",
"properties": {