Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 10:46:10 +01:00
This commit is contained in:
zhuharev 2016-01-06 22:41:42 +03:00
parent 0cb7396840
commit 0d5dc8a064
3 changed files with 6 additions and 6 deletions

View file

@ -57,8 +57,8 @@ func ListAccessTokens(uid int64) ([]*AccessToken, error) {
return tokens, nil
}
// UpdateAccessToekn updates information of access token.
func UpdateAccessToekn(t *AccessToken) error {
// UpdateAccessToken updates information of access token.
func UpdateAccessToken(t *AccessToken) error {
_, err := x.Id(t.ID).AllCols().Update(t)
return err
}

View file

@ -55,8 +55,8 @@ func SignedInID(ctx *macaron.Context, sess session.Store) int64 {
return 0
}
t.Updated = time.Now()
if err = models.UpdateAccessToekn(t); err != nil {
log.Error(4, "UpdateAccessToekn: %v", err)
if err = models.UpdateAccessToken(t); err != nil {
log.Error(4, "UpdateAccessToken: %v", err)
}
return t.UID
}

View file

@ -126,8 +126,8 @@ func HTTP(ctx *middleware.Context) {
return
}
token.Updated = time.Now()
if err = models.UpdateAccessToekn(token); err != nil {
ctx.Handle(500, "UpdateAccessToekn", err)
if err = models.UpdateAccessToken(token); err != nil {
ctx.Handle(500, "UpdateAccessToken", err)
}
authUser, err = models.GetUserByID(token.UID)
if err != nil {