summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-18 15:37:48 -0500
committerUnknwon <u@gogs.io>2015-11-18 15:37:48 -0500
commitefea642d6cf419c9587d44b95ff2bc04e89f7bfe (patch)
tree56e466a92cd206609a74b9c07db436127af2abe5 /routers
parent81d7359fdd3042aed0bcb4a8e5dee24208d34e58 (diff)
downloadgitea-efea642d6cf419c9587d44b95ff2bc04e89f7bfe.tar.gz
gitea-efea642d6cf419c9587d44b95ff2bc04e89f7bfe.zip
add admin op: delete missing repos
Diffstat (limited to 'routers')
-rw-r--r--routers/admin/admin.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 54e4559ff9..f530cd43cb 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -116,6 +116,7 @@ type AdminOperation int
const (
CLEAN_INACTIVATE_USER AdminOperation = iota + 1
CLEAN_REPO_ARCHIVES
+ CLEAN_MISSING_REPOS
GIT_GC_REPOS
SYNC_SSH_AUTHORIZED_KEY
SYNC_REPOSITORY_UPDATE_HOOK
@@ -139,6 +140,9 @@ func Dashboard(ctx *middleware.Context) {
case CLEAN_REPO_ARCHIVES:
success = ctx.Tr("admin.dashboard.delete_repo_archives_success")
err = models.DeleteRepositoryArchives()
+ case CLEAN_MISSING_REPOS:
+ success = ctx.Tr("admin.dashboard.delete_missing_repos_success")
+ err = models.DeleteMissingRepositories()
case GIT_GC_REPOS:
success = ctx.Tr("admin.dashboard.git_gc_repos_success")
err = models.GitGcRepos()