mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 16:30:15 +00:00
API: support '/orgs/:org/repos' (#2047)
* API: support '/orgs/:org/repos'
This commit is contained in:
parent
f011d6d4d7
commit
6a3c03762a
4 changed files with 57 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue