fix: lint
This commit is contained in:
parent
cab29d7b05
commit
94f5650feb
|
@ -17,10 +17,11 @@
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"code.vikunja.io/api/pkg/user"
|
"code.vikunja.io/api/pkg/user"
|
||||||
"code.vikunja.io/web/handler"
|
"code.vikunja.io/web/handler"
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type TokenResponse struct {
|
type TokenResponse struct {
|
||||||
|
|
|
@ -73,6 +73,9 @@ func generateHashedToken(s *xorm.Session, u *User, kind TokenKind) (token *Token
|
||||||
token = genToken(u, kind)
|
token = genToken(u, kind)
|
||||||
token.ClearTextToken = token.Token
|
token.ClearTextToken = token.Token
|
||||||
token.Token, err = HashPassword(token.ClearTextToken)
|
token.Token, err = HashPassword(token.ClearTextToken)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
_, err = s.Insert(token)
|
_, err = s.Insert(token)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user