summaryrefslogtreecommitdiffstats
path: root/routers/admin/repos.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/admin/repos.go')
-rw-r--r--routers/admin/repos.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/admin/repos.go b/routers/admin/repos.go
index d345c8e76a..73aa66807b 100644
--- a/routers/admin/repos.go
+++ b/routers/admin/repos.go
@@ -11,6 +11,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/routers"
+ repo_service "code.gitea.io/gitea/services/repository"
)
const (
@@ -38,7 +39,7 @@ func DeleteRepo(ctx *context.Context) {
return
}
- if err := models.DeleteRepository(ctx.User, repo.MustOwner().ID, repo.ID); err != nil {
+ if err := repo_service.DeleteRepository(ctx.User, repo); err != nil {
ctx.ServerError("DeleteRepository", err)
return
}