chore: drop unused redirectToLoginOnMe parameter (#10164)

The parameter seems to be vestigial from an earlier use of the middleware, but is always set to `false` in the code.
This commit is contained in:
Spike Curtis
2023-10-10 16:13:00 +04:00
committed by GitHub
parent 5ae6cda89f
commit b780bff429
6 changed files with 13 additions and 22 deletions

View File

@ -269,7 +269,7 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
apiKeyMiddleware,
)
r.Route("/{user}", func(r chi.Router) {
r.Use(httpmw.ExtractUserParam(options.Database, false))
r.Use(httpmw.ExtractUserParam(options.Database))
r.Get("/", api.workspaceQuota)
})
})
@ -296,7 +296,7 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
r.Use(
api.autostopRequirementEnabledMW,
apiKeyMiddleware,
httpmw.ExtractUserParam(options.Database, false),
httpmw.ExtractUserParam(options.Database),
)
r.Get("/", api.userQuietHoursSchedule)