日志发送逻辑及测试消息发送接口
This commit is contained in:
@@ -3915,6 +3915,64 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/users/{id}/notifications/test": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "为指定用户发送一条特定渠道的测试消息,以验证其配置是否正确。",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"用户管理"
|
||||
],
|
||||
"summary": "发送测试通知",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "用户ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.SendTestNotificationRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功响应",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -5583,6 +5641,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SendTestNotificationRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"description": "Type 指定要测试的通知渠道\n@enum(smtp, wechat, lark, log)",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/notify.NotifierType"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SensorDataDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -6522,6 +6596,23 @@
|
||||
"$ref": "#/definitions/models.SensorType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notify.NotifierType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"smtp",
|
||||
"wechat",
|
||||
"lark",
|
||||
"sms",
|
||||
"log"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"NotifierTypeSMTP",
|
||||
"NotifierTypeWeChat",
|
||||
"NotifierTypeLark",
|
||||
"NotifierTypeSMS",
|
||||
"NotifierTypeLog"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
||||
Reference in New Issue
Block a user