fix(api tokens): lint

This commit is contained in:
kolaente 2023-09-01 15:56:35 +02:00
parent a4d946b4a9
commit eac4e455fd
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 2 additions and 4 deletions

View File

@ -21,6 +21,7 @@ import (
"crypto/subtle"
"encoding/hex"
"time"
"xorm.io/builder"
"code.vikunja.io/api/pkg/db"

View File

@ -41,10 +41,7 @@ func SetupTokenMiddleware() echo.MiddlewareFunc {
for _, s := range authHeader {
if strings.HasPrefix(s, "Bearer "+models.APITokenPrefix) {
err := checkAPITokenAndPutItInContext(s, c)
if err != nil {
return false
}
return true
return err == nil
}
}