Skip to content

Commit

Permalink
inject license count
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Oct 15, 2024
1 parent 0b49ea0 commit a45080c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rest/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
)

type CustomValue string
type CustomIntValue string

// auth middleware

Expand Down Expand Up @@ -142,7 +141,7 @@ func (c *Context) injectUserMiddleware(next http.Handler) http.Handler {
}

ctx := context.WithValue(r.Context(), CustomValue("user"), user)
ctx = context.WithValue(ctx, CustomIntValue("licenseUserCount"), c.LicenseUserCount)
ctx = context.WithValue(ctx, CustomValue("licenseUserCount"), c.LicenseUserCount)
next.ServeHTTP(w, r.WithContext(ctx))
})
}
Expand Down

0 comments on commit a45080c

Please sign in to comment.