1
0

chore(deps): update golangci/golangci-lint docker tag to v1.56.2 (#2099)

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2099
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
This commit is contained in:
renovate
2024-03-10 13:47:19 +00:00
committed by konrad
parent 1d5517b53a
commit d7fdefcead
19 changed files with 46 additions and 45 deletions

View File

@ -48,7 +48,7 @@ func SetupTokenMiddleware() echo.MiddlewareFunc {
return false
},
ErrorHandler: func(c echo.Context, err error) error {
ErrorHandler: func(_ echo.Context, err error) error {
if err != nil {
return echo.NewHTTPError(http.StatusUnauthorized, "missing, malformed, expired or otherwise invalid token provided").SetInternal(err)
}

View File

@ -83,7 +83,7 @@ func setupMetrics(a *echo.Group) {
r := a.Group("/metrics")
if config.MetricsUsername.GetString() != "" && config.MetricsPassword.GetString() != "" {
r.Use(middleware.BasicAuth(func(username, password string, c echo.Context) (bool, error) {
r.Use(middleware.BasicAuth(func(username, password string, _ echo.Context) (bool, error) {
if subtle.ConstantTimeCompare([]byte(username), []byte(config.MetricsUsername.GetString())) == 1 &&
subtle.ConstantTimeCompare([]byte(password), []byte(config.MetricsPassword.GetString())) == 1 {
return true, nil

View File

@ -203,7 +203,7 @@ func RegisterRoutes(e *echo.Echo) {
// API Routes
a := e.Group("/api/v1")
e.OnAddRouteHandler = func(host string, route echo.Route, handler echo.HandlerFunc, middleware []echo.MiddlewareFunc) {
e.OnAddRouteHandler = func(_ string, route echo.Route, _ echo.HandlerFunc, _ []echo.MiddlewareFunc) {
models.CollectRoutesForAPITokenUsage(route)
}
registerAPIRoutes(a)