aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/pull_review.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/pull_review.go')
-rw-r--r--routers/api/v1/repo/pull_review.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/api/v1/repo/pull_review.go b/routers/api/v1/repo/pull_review.go
index b4a484f68c..331b78e1d8 100644
--- a/routers/api/v1/repo/pull_review.go
+++ b/routers/api/v1/repo/pull_review.go
@@ -10,6 +10,7 @@ import (
"strings"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/organization"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/convert"
@@ -722,12 +723,12 @@ func apiReviewRequest(ctx *context.APIContext, opts api.PullReviewRequestOptions
if ctx.Repo.Repository.Owner.IsOrganization() && len(opts.TeamReviewers) > 0 {
- teamReviewers := make([]*models.Team, 0, len(opts.TeamReviewers))
+ teamReviewers := make([]*organization.Team, 0, len(opts.TeamReviewers))
for _, t := range opts.TeamReviewers {
- var teamReviewer *models.Team
- teamReviewer, err = models.GetTeam(ctx.Repo.Owner.ID, t)
+ var teamReviewer *organization.Team
+ teamReviewer, err = organization.GetTeam(ctx.Repo.Owner.ID, t)
if err != nil {
- if models.IsErrTeamNotExist(err) {
+ if organization.IsErrTeamNotExist(err) {
ctx.NotFound("TeamNotExist", fmt.Sprintf("Team '%s' not exist", t))
return
}