summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-06 13:47:47 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-06 13:47:47 -0400
commit7cb5a15c9b7a2a118d756d15cb745743f207a318 (patch)
treedba01566116b8ad49f0762812ecb3ab96597090f /models
parente573855a4f040abd4aa6a2afa9ce610a1ec2670f (diff)
downloadgitea-7cb5a15c9b7a2a118d756d15cb745743f207a318.tar.gz
gitea-7cb5a15c9b7a2a118d756d15cb745743f207a318.zip
Batch of mirror fixes
Diffstat (limited to 'models')
-rw-r--r--models/action.go5
-rw-r--r--models/oauth2.go6
2 files changed, 9 insertions, 2 deletions
diff --git a/models/action.go b/models/action.go
index 231a7a5485..ef9e260a0b 100644
--- a/models/action.go
+++ b/models/action.go
@@ -30,14 +30,15 @@ const (
OP_PULL_REQUEST
OP_TRANSFER_REPO
OP_PUSH_TAG
+ OP_COMMENT_ISSUE
)
// Action represents user operation type and other information to repository.,
// it implemented interface base.Actioner so that can be used in template render.
type Action struct {
Id int64
- UserId int64 // Receiver user id.
- OpType int // Operations: CREATE DELETE STAR ...
+ UserId int64 // Receiver user id.
+ OpType int
ActUserId int64 // Action user id.
ActUserName string // Action user name.
ActEmail string
diff --git a/models/oauth2.go b/models/oauth2.go
index 97ba519c57..61044d6882 100644
--- a/models/oauth2.go
+++ b/models/oauth2.go
@@ -80,3 +80,9 @@ func DeleteOauth2ById(id int64) error {
_, err := orm.Delete(&Oauth2{Id: id})
return err
}
+
+// CleanUnbindOauth deletes all unbind OAuthes.
+func CleanUnbindOauth() error {
+ _, err := orm.Delete(&Oauth2{Uid: -1})
+ return err
+}