mirror of
https://github.com/miniflux/v2.git
synced 2025-07-22 17:18:37 +00:00
feat(googlereader): avoid SQL query to fetch username in streamItemContentsHandler
This commit is contained in:
parent
8d821dfc3b
commit
3de9629a49
4 changed files with 20 additions and 14 deletions
|
@ -177,6 +177,7 @@ func (m *middleware) apiKeyAuth(next http.Handler) http.Handler {
|
|||
|
||||
ctx := r.Context()
|
||||
ctx = context.WithValue(ctx, request.UserIDContextKey, user.ID)
|
||||
ctx = context.WithValue(ctx, request.UserNameContextKey, user.Username)
|
||||
ctx = context.WithValue(ctx, request.UserTimezoneContextKey, user.Timezone)
|
||||
ctx = context.WithValue(ctx, request.IsAdminUserContextKey, user.IsAdmin)
|
||||
ctx = context.WithValue(ctx, request.IsAuthenticatedContextKey, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue