fix: use realKey

This commit is contained in:
Derrick Hammer 2024-02-17 20:25:30 -05:00
parent 0cb1f96813
commit 84a78b7a7e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ func GetUserFromContext(ctx context.Context, key ...string) uint {
realKey = DEFAULT_AUTH_CONTEXT_KEY
}
userId, ok := ctx.Value(key).(uint)
userId, ok := ctx.Value(realKey).(uint)
if !ok {
panic("user id stored in context is not of type uint")