fix: use realKey
This commit is contained in:
parent
0cb1f96813
commit
84a78b7a7e
|
@ -185,7 +185,7 @@ func GetUserFromContext(ctx context.Context, key ...string) uint {
|
||||||
realKey = DEFAULT_AUTH_CONTEXT_KEY
|
realKey = DEFAULT_AUTH_CONTEXT_KEY
|
||||||
}
|
}
|
||||||
|
|
||||||
userId, ok := ctx.Value(key).(uint)
|
userId, ok := ctx.Value(realKey).(uint)
|
||||||
|
|
||||||
if !ok {
|
if !ok {
|
||||||
panic("user id stored in context is not of type uint")
|
panic("user id stored in context is not of type uint")
|
||||||
|
|
Loading…
Reference in New Issue