aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org/member.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/org/member.go')
-rw-r--r--routers/api/v1/org/member.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/org/member.go b/routers/api/v1/org/member.go
index edcee1e207..294d33014d 100644
--- a/routers/api/v1/org/member.go
+++ b/routers/api/v1/org/member.go
@@ -7,7 +7,6 @@ import (
"net/http"
"net/url"
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/organization"
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
@@ -15,6 +14,7 @@ import (
"code.gitea.io/gitea/routers/api/v1/utils"
"code.gitea.io/gitea/services/context"
"code.gitea.io/gitea/services/convert"
+ org_service "code.gitea.io/gitea/services/org"
)
// listMembers list an organization's members
@@ -322,7 +322,7 @@ func DeleteMember(ctx *context.APIContext) {
if ctx.Written() {
return
}
- if err := models.RemoveOrgUser(ctx, ctx.Org.Organization, member); err != nil {
+ if err := org_service.RemoveOrgUser(ctx, ctx.Org.Organization, member); err != nil {
ctx.Error(http.StatusInternalServerError, "RemoveOrgUser", err)
}
ctx.Status(http.StatusNoContent)