API: support '/orgs/:org/repos' (#2047)

* API: support '/orgs/:org/repos'
This commit is contained in:
Aaron Walker 2017-07-13 04:14:15 -07:00 committed by Kim "BKC" Carlbäcker
parent f011d6d4d7
commit 6a3c03762a
4 changed files with 57 additions and 1 deletions

View file

@ -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)
}