mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 09:39:44 +08:00
API: support '/orgs/:org/repos' (#2047)
* API: support '/orgs/:org/repos'
This commit is contained in:

committed by
Kim "BKC" Carlbäcker

parent
f011d6d4d7
commit
6a3c03762a
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user