diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-11 21:47:43 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-11 21:47:43 -0400 |
commit | 4fc5dcc7648c9e01e05f9dbf08e930ba325839d9 (patch) | |
tree | 34bc4d3cc3ce0edf0ee139605c966d0199d14eb3 /models | |
parent | 33aa4f74380ab117673a1cc30bead3a7f2b3cb4b (diff) | |
parent | f8e97b75fbe7201830413fabead33967fb690827 (diff) | |
download | gitea-4fc5dcc7648c9e01e05f9dbf08e930ba325839d9.tar.gz gitea-4fc5dcc7648c9e01e05f9dbf08e930ba325839d9.zip |
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'models')
-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 } |