aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/org/teams.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-09-08 12:51:15 +0800
committerGitHub <noreply@github.com>2023-09-08 04:51:15 +0000
commit4f32abaf941ba30ade1f96930a05d14f1c6a6782 (patch)
tree9351b7d654b20db032867041b0292924ec93bb3f /routers/web/org/teams.go
parent3c0c27965836328abd2668dcd77710ee2460535e (diff)
downloadgitea-4f32abaf941ba30ade1f96930a05d14f1c6a6782.tar.gz
gitea-4f32abaf941ba30ade1f96930a05d14f1c6a6782.zip
move repository deletion to service layer (#26948)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/org/teams.go')
-rw-r--r--routers/web/org/teams.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/org/teams.go b/routers/web/org/teams.go
index 38bc8b4e3a..2fd2a681af 100644
--- a/routers/web/org/teams.go
+++ b/routers/web/org/teams.go
@@ -29,6 +29,7 @@ import (
"code.gitea.io/gitea/services/convert"
"code.gitea.io/gitea/services/forms"
org_service "code.gitea.io/gitea/services/org"
+ repo_service "code.gitea.io/gitea/services/repository"
)
const (
@@ -248,7 +249,7 @@ func TeamsRepoAction(ctx *context.Context) {
}
err = org_service.TeamAddRepository(ctx.Org.Team, repo)
case "remove":
- err = models.RemoveRepository(ctx.Org.Team, ctx.FormInt64("repoid"))
+ err = repo_service.RemoveRepositoryFromTeam(ctx, ctx.Org.Team, ctx.FormInt64("repoid"))
case "addall":
err = models.AddAllRepositories(ctx.Org.Team)
case "removeall":