aboutsummaryrefslogtreecommitdiffstats
path: root/services/wiki/wiki.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/wiki/wiki.go')
-rw-r--r--services/wiki/wiki.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/wiki/wiki.go b/services/wiki/wiki.go
index e1590f461e..5acb23ac78 100644
--- a/services/wiki/wiki.go
+++ b/services/wiki/wiki.go
@@ -366,3 +366,13 @@ func DeleteWikiPage(doer *models.User, repo *models.Repository, wikiName string)
return nil
}
+
+// DeleteWiki removes the actual and local copy of repository wiki.
+func DeleteWiki(repo *models.Repository) error {
+ if err := models.UpdateRepositoryUnits(repo, nil, []models.UnitType{models.UnitTypeWiki}); err != nil {
+ return err
+ }
+
+ models.RemoveAllWithNotice("Delete repository wiki", repo.WikiPath())
+ return nil
+}