fix: lint

This commit is contained in:
kolaente 2021-12-12 17:06:46 +01:00
parent cab29d7b05
commit 94f5650feb
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 5 additions and 1 deletions

View File

@ -17,10 +17,11 @@
package v1
import (
"net/http"
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/web/handler"
"github.com/labstack/echo/v4"
"net/http"
)
type TokenResponse struct {

View File

@ -73,6 +73,9 @@ func generateHashedToken(s *xorm.Session, u *User, kind TokenKind) (token *Token
token = genToken(u, kind)
token.ClearTextToken = token.Token
token.Token, err = HashPassword(token.ClearTextToken)
if err != nil {
return nil, err
}
_, err = s.Insert(token)
return