refactor: replace hardcoded string with ctxkey constant (#1579)

Co-authored-by: 江杭辉 <jianghanghui@k.app>
This commit is contained in:
igophper
2024-06-30 16:13:43 +08:00
committed by jinjianmingming
parent 57e0f55d32
commit 346a4a53c9
3 changed files with 5 additions and 5 deletions

View File

@@ -48,7 +48,7 @@ func Relay(c *gin.Context) {
logger.Debugf(ctx, "request body: %s", string(requestBody))
}
channelId := c.GetInt(ctxkey.ChannelId)
userId := c.GetInt("id")
userId := c.GetInt(ctxkey.Id)
bizErr := relayHelper(c, relayMode)
if bizErr == nil {
monitor.Emit(channelId, true)