diff options
author | skyblue <ssx205@gmail.com> | 2014-04-12 09:42:09 +0800 |
---|---|---|
committer | skyblue <ssx205@gmail.com> | 2014-04-12 09:42:09 +0800 |
commit | 5c1312f38e8968e068125a1b1dd59060f3f29bfe (patch) | |
tree | 92f442d78974645e98465de73679d3e163f681bb /models/oauth2.go | |
parent | 4c6e0e94995b95d3493c6641fbb5a528c6d6c134 (diff) | |
download | gitea-5c1312f38e8968e068125a1b1dd59060f3f29bfe.tar.gz gitea-5c1312f38e8968e068125a1b1dd59060f3f29bfe.zip |
clean oauth2 code
Diffstat (limited to 'models/oauth2.go')
-rw-r--r-- | models/oauth2.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/models/oauth2.go b/models/oauth2.go index e50d4039fd..c5d58c0749 100644 --- a/models/oauth2.go +++ b/models/oauth2.go @@ -6,8 +6,6 @@ package models import ( "errors" - - "github.com/gogits/gogs/modules/log" ) // OT: Oauth2 Type @@ -20,7 +18,6 @@ const ( var ( ErrOauth2RecordNotExists = errors.New("not exists oauth2 record") ErrOauth2NotAssociatedWithUser = errors.New("not associated with user") - ErrOauth2NotExist = errors.New("not exist oauth2") ) type Oauth2 struct { @@ -61,12 +58,11 @@ func GetOauth2(identity string) (oa *Oauth2, err error) { func GetOauth2ById(id int64) (oa *Oauth2, err error) { oa = new(Oauth2) has, err := orm.Id(id).Get(oa) - log.Info("oa: %v", oa) if err != nil { return nil, err } if !has { - return nil, ErrOauth2NotExist + return nil, ErrOauth2RecordNotExists } return oa, nil } |