summaryrefslogtreecommitdiffstats
path: root/models/token.go
diff options
context:
space:
mode:
authorThibault Meyer <meyer.thibault@gmail.com>2016-11-10 16:16:32 +0100
committerThibault Meyer <meyer.thibault@gmail.com>2016-11-10 20:59:51 +0100
commita4454f5d0fbeaacb94668012acbb4296465cb28f (patch)
treeeaf39d1935eda44cf16df08234d2bbddd39c3ddd /models/token.go
parentc040f2fbb13ef5ba2c6a619322d4801e9f78c885 (diff)
downloadgitea-a4454f5d0fbeaacb94668012acbb4296465cb28f.tar.gz
gitea-a4454f5d0fbeaacb94668012acbb4296465cb28f.zip
Rewrite XORM queries
Diffstat (limited to 'models/token.go')
-rw-r--r--models/token.go5
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.