mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-22 16:06:48 +08:00
refactor: replace hardcoded string with ctxkey constant
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user