summaryrefslogtreecommitdiffstats
path: root/routers/web/org/teams.go
diff options
context:
space:
mode:
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":