summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/user/repo.go')
-rw-r--r--routers/api/v1/user/repo.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go
index cc08094fc5..ddb932bce9 100644
--- a/routers/api/v1/user/repo.go
+++ b/routers/api/v1/user/repo.go
@@ -36,6 +36,15 @@ func listUserRepos(ctx *context.APIContext, u *models.User) {
// ListUserRepos - list the repos owned and accessible by the given user.
func ListUserRepos(ctx *context.APIContext) {
+ // swagger:route GET /users/{username}/repos userListRepos
+ //
+ // Produces:
+ // - application/json
+ //
+ // Responses:
+ // 200: RepositoryList
+ // 500: error
+
user := GetUserByParams(ctx)
if ctx.Written() {
return
@@ -44,8 +53,16 @@ func ListUserRepos(ctx *context.APIContext) {
}
// ListMyRepos - list the repositories owned by you.
-// see https://github.com/gogits/go-gogs-client/wiki/Repositories#list-your-repositories
func ListMyRepos(ctx *context.APIContext) {
+ // swagger:route GET /user/repos userCurrentListRepos
+ //
+ // Produces:
+ // - application/json
+ //
+ // Responses:
+ // 200: RepositoryList
+ // 500: error
+
listUserRepos(ctx, ctx.User)
}