feat: 记录 Telegram 配置启用状态并初始化设备中间件响应写入器字段。
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 5m3s
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 5m3s
This commit is contained in:
parent
d0a3b36791
commit
c4f327562f
@ -14,6 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func Telegram(svc *svc.ServiceContext) {
|
||||
logger.Infof("Telegram Config Enable: %v", svc.Config.Telegram.Enable)
|
||||
if !svc.Config.Telegram.Enable {
|
||||
return
|
||||
}
|
||||
|
||||
@ -74,6 +74,8 @@ func NewResponseWriter(c *gin.Context, srvCtx *svc.ServiceContext) (rw *Response
|
||||
c: c,
|
||||
body: new(bytes.Buffer),
|
||||
ResponseWriter: c.Writer,
|
||||
size: noWritten,
|
||||
status: defaultStatus,
|
||||
}
|
||||
rw.encryptionKey = srvCtx.Config.Device.SecuritySecret
|
||||
rw.encryptionMethod = "AES"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user