summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/admin/adopt.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/admin/adopt.go')
-rw-r--r--routers/api/v1/admin/adopt.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/api/v1/admin/adopt.go b/routers/api/v1/admin/adopt.go
index 9c1b9fc0f8..184a2941a8 100644
--- a/routers/api/v1/admin/adopt.go
+++ b/routers/api/v1/admin/adopt.go
@@ -9,9 +9,9 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
- "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/routers/api/v1/utils"
+ repo_service "code.gitea.io/gitea/services/repository"
)
// ListUnadoptedRepositories lists the unadopted repositories that match the provided names
@@ -41,7 +41,7 @@ func ListUnadoptedRepositories(ctx *context.APIContext) {
// "$ref": "#/responses/forbidden"
listOptions := utils.GetListOptions(ctx)
- repoNames, count, err := repository.ListUnadoptedRepositories(ctx.FormString("query"), &listOptions)
+ repoNames, count, err := repo_service.ListUnadoptedRepositories(ctx.FormString("query"), &listOptions)
if err != nil {
ctx.InternalServerError(err)
}
@@ -104,7 +104,7 @@ func AdoptRepository(ctx *context.APIContext) {
ctx.NotFound()
return
}
- if _, err := repository.AdoptRepository(ctx.User, ctxUser, models.CreateRepoOptions{
+ if _, err := repo_service.AdoptRepository(ctx.User, ctxUser, models.CreateRepoOptions{
Name: repoName,
IsPrivate: true,
}); err != nil {
@@ -167,7 +167,7 @@ func DeleteUnadoptedRepository(ctx *context.APIContext) {
return
}
- if err := repository.DeleteUnadoptedRepository(ctx.User, ctxUser, repoName); err != nil {
+ if err := repo_service.DeleteUnadoptedRepository(ctx.User, ctxUser, repoName); err != nil {
ctx.InternalServerError(err)
return
}