diff options
author | Thibault Meyer <meyer.thibault@gmail.com> | 2016-11-10 16:16:32 +0100 |
---|---|---|
committer | Thibault Meyer <meyer.thibault@gmail.com> | 2016-11-10 20:59:51 +0100 |
commit | a4454f5d0fbeaacb94668012acbb4296465cb28f (patch) | |
tree | eaf39d1935eda44cf16df08234d2bbddd39c3ddd /models/token.go | |
parent | c040f2fbb13ef5ba2c6a619322d4801e9f78c885 (diff) | |
download | gitea-a4454f5d0fbeaacb94668012acbb4296465cb28f.tar.gz gitea-a4454f5d0fbeaacb94668012acbb4296465cb28f.zip |
Rewrite XORM queries
Diffstat (limited to 'models/token.go')
-rw-r--r-- | models/token.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/models/token.go b/models/token.go index 5d9053cc20..83b0005a27 100644 --- a/models/token.go +++ b/models/token.go @@ -72,7 +72,10 @@ func GetAccessTokenBySHA(sha string) (*AccessToken, error) { // ListAccessTokens returns a list of access tokens belongs to given user. func ListAccessTokens(uid int64) ([]*AccessToken, error) { tokens := make([]*AccessToken, 0, 5) - return tokens, x.Where("uid=?", uid).Desc("id").Find(&tokens) + return tokens, x. + Where("uid=?", uid). + Desc("id"). + Find(&tokens) } // UpdateAccessToken updates information of access token. |