refactor: mv ctx to a later point
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-06-04 11:36:07 +02:00
parent afc97407f6
commit ce383b5818
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -279,11 +279,6 @@ func ViewUser() echo.HandlerFunc {
)
}
ctx, ok := c.Get("sloggerCtx").(context.Context)
if !ok {
ctx = context.WithValue(context.Background(), moduser.CtxKey{}, slogger)
}
if !u.IsAdmin {
c.Logger().Debug("this is a restricted endpoint")
@ -295,6 +290,11 @@ func ViewUser() echo.HandlerFunc {
)
}
ctx, ok := c.Get("sloggerCtx").(context.Context)
if !ok {
ctx = context.WithValue(context.Background(), moduser.CtxKey{}, slogger)
}
p := page{
AppName: setting.AppName(),
AppVer: appver,