Fix linter (#3354)

This commit is contained in:
Anbraten
2024-02-08 22:49:07 +01:00
committed by GitHub
parent 832f49a164
commit 0b91317cde
9 changed files with 14 additions and 14 deletions

View File

@@ -29,7 +29,7 @@ func AuthorizeAgent(c *gin.Context) {
return
}
parsed, err := token.ParseRequest(c.Request, func(t *token.Token) (string, error) {
parsed, err := token.ParseRequest(c.Request, func(_ *token.Token) (string, error) {
return secret, nil
})
switch {

View File

@@ -55,7 +55,7 @@ func SetUser() gin.HandlerFunc {
// this means the user is accessing with a web browser,
// so we should implement CSRF protection measures.
if t.Kind == token.SessToken {
err = token.CheckCsrf(c.Request, func(t *token.Token) (string, error) {
err = token.CheckCsrf(c.Request, func(_ *token.Token) (string, error) {
return user.Hash, nil
})
// if csrf token validation fails, exit immediately