aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/admin/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/admin/repo.go')
-rw-r--r--routers/api/v1/admin/repo.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/routers/api/v1/admin/repo.go b/routers/api/v1/admin/repo.go
index a52d462137..232fb988c8 100644
--- a/routers/api/v1/admin/repo.go
+++ b/routers/api/v1/admin/repo.go
@@ -13,8 +13,21 @@ import (
)
// CreateRepo api for creating a repository
-// see https://github.com/gogits/go-gogs-client/wiki/Administration-Repositories#create-a-new-repository
func CreateRepo(ctx *context.APIContext, form api.CreateRepoOption) {
+ // swagger:route POST /admin/users/{username}/repos admin adminCreateRepo
+ //
+ // Consumes:
+ // - application/json
+ //
+ // Produces:
+ // - application/json
+ //
+ // Responses:
+ // 201: Repository
+ // 403: forbidden
+ // 422: validationError
+ // 500: error
+
owner := user.GetUserByParams(ctx)
if ctx.Written() {
return