summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-09 21:42:25 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-09 21:42:25 -0400
commit5d4025cb5a629716bf84f4f5bf3baa97af716df4 (patch)
tree0302bc6bc306df2f400b8b19fb9531918e09c7ca /models
parent3487f1728530fd2b0a447fe6fd7ef079cb53eed4 (diff)
downloadgitea-5d4025cb5a629716bf84f4f5bf3baa97af716df4.tar.gz
gitea-5d4025cb5a629716bf84f4f5bf3baa97af716df4.zip
Add go get meta support
Diffstat (limited to 'models')
-rw-r--r--models/repo.go1
-rw-r--r--models/user.go11
2 files changed, 11 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 4f58f407fa..573e0f4e6f 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -79,6 +79,7 @@ type Repository struct {
NumOpenIssues int `xorm:"-"`
IsPrivate bool
IsBare bool
+ IsGoget bool
Created time.Time `xorm:"created"`
Updated time.Time `xorm:"updated"`
}
diff --git a/models/user.go b/models/user.go
index 0fcf72437e..b2fddd0a1d 100644
--- a/models/user.go
+++ b/models/user.go
@@ -289,11 +289,21 @@ func DeleteUser(user *User) error {
// TODO: check issues, other repos' commits
+ // Delete all followers.
+ if _, err = orm.Delete(&Follow{FollowId: user.Id}); err != nil {
+ return err
+ }
+
// Delete all feeds.
if _, err = orm.Delete(&Action{UserId: user.Id}); err != nil {
return err
}
+ // Delete all watches.
+ if _, err = orm.Delete(&Watch{UserId: user.Id}); err != nil {
+ return err
+ }
+
// Delete all accesses.
if _, err = orm.Delete(&Access{UserName: user.LowerName}); err != nil {
return err
@@ -316,7 +326,6 @@ func DeleteUser(user *User) error {
}
_, err = orm.Delete(user)
- // TODO: delete and update follower information.
return err
}