From 6a3c03762a37f593ec8101c2005836ca44683e1d Mon Sep 17 00:00:00 2001 From: Aaron Walker Date: Thu, 13 Jul 2017 04:14:15 -0700 Subject: API: support '/orgs/:org/repos' (#2047) * API: support '/orgs/:org/repos' --- routers/api/v1/user/repo.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'routers/api/v1/user/repo.go') diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go index c929da5e37..b4a4653faa 100644 --- a/routers/api/v1/user/repo.go +++ b/routers/api/v1/user/repo.go @@ -1,3 +1,7 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + package user import ( @@ -80,3 +84,17 @@ func ListMyRepos(ctx *context.APIContext) { } ctx.JSON(200, &apiRepos) } + +// ListOrgRepos - list the repositories of an organization. +func ListOrgRepos(ctx *context.APIContext) { + // swagger:route GET /orgs/{org}/repos orgListRepos + // + // Produces: + // - application/json + // + // Responses: + // 200: RepositoryList + // 500: error + + listUserRepos(ctx, ctx.Org.Organization) +} -- cgit v1.2.3