diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-05 16:21:43 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-05 16:21:43 -0400 |
commit | bbdfe2576966210cfffc830bfbe3731bcf653b3b (patch) | |
tree | bc0fc83c71887270c4f38d53be8383985ffd01c5 /models/oauth2.go | |
parent | c1eb4d894a092aed1b87ddf5f80ee824fd56789d (diff) | |
download | gitea-bbdfe2576966210cfffc830bfbe3731bcf653b3b.tar.gz gitea-bbdfe2576966210cfffc830bfbe3731bcf653b3b.zip |
User code clean and ui improve
Diffstat (limited to 'models/oauth2.go')
-rw-r--r-- | models/oauth2.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/oauth2.go b/models/oauth2.go index d1ae4611b8..97ba519c57 100644 --- a/models/oauth2.go +++ b/models/oauth2.go @@ -74,3 +74,9 @@ func GetOauthByUserId(uid int64) (oas []*Oauth2, err error) { err = orm.Find(&oas, Oauth2{Uid: uid}) return oas, err } + +// DeleteOauth2ById deletes a oauth2 by ID. +func DeleteOauth2ById(id int64) error { + _, err := orm.Delete(&Oauth2{Id: id}) + return err +} |