refactor: replace hardcoded string with ctxkey constant

This commit is contained in:
江杭辉
2024-06-28 17:48:11 +08:00
parent 254b9777c0
commit 34922e3b9e
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)