1
0
Fork 0
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:
Frédéric Guillot 2025-05-04 20:31:12 -07:00
parent 8d821dfc3b
commit 3de9629a49
4 changed files with 20 additions and 14 deletions

View file

@ -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)