Merge pull request #2352 from zhuharev/develop

typo fix
tokarchuk/v1.17
Unknwon 9 years ago
commit f4309bbb05
  1. 4
      models/token.go
  2. 4
      modules/auth/auth.go
  3. 4
      routers/repo/http.go

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

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

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

Loading…
Cancel
Save