Browse Source

Merge pull request #2352 from zhuharev/develop

typo fix
for-closed-social
Unknwon 8 years ago
parent
commit
f4309bbb05
3 changed files with 6 additions and 6 deletions
  1. +2
    -2
      models/token.go
  2. +2
    -2
      modules/auth/auth.go
  3. +2
    -2
      routers/repo/http.go

+ 2
- 2
models/token.go 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
}

+ 2
- 2
modules/auth/auth.go 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
}

+ 2
- 2
routers/repo/http.go 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 {

Loading…
Cancel
Save