mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-01 05:22:50 +09:00
Fix #185
This commit is contained in:
@ -676,6 +676,14 @@ func DeleteRepository(userId, repoId int64, userName string) (err error) {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
if _, err = sess.Delete(&Issue{RepoId: repoId}); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
if _, err = sess.Delete(&IssueUser{RepoId: repoId}); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
rawSql := "UPDATE `user` SET num_repos = num_repos - 1 WHERE id = ?"
|
||||
if _, err = sess.Exec(rawSql, userId); err != nil {
|
||||
|
Reference in New Issue
Block a user