Remove redundant token update

Signed-off-by: Anders B. Hansen <anders@birkoe.com>
This commit is contained in:
Anders B. Hansen 2018-07-18 19:06:27 +02:00
parent d7e4ca2991
commit b408033e43

View File

@ -16,7 +16,6 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
"github.com/dgrijalva/jwt-go"
"gopkg.in/macaron.v1"
@ -584,12 +583,6 @@ func parseToken(authorization string) (*models.User, *models.Repository, string,
return nil, nil, "basic", err
}
token.UpdatedUnix = util.TimeStampNow()
err = models.UpdateAccessToken(token)
if err != nil {
return nil, nil, "basic", err
}
} else {
return nil, nil, "basic", err
}