forked from kevadesu/forgejo
feat(api): An order_by
param for user.ListMyRepos
Add an optional `order_by` parameter to the `user.ListMyRepos` handler (which handles the `/api/v1/user/repos` route), allowing a user to sort repos by name (the default), id, or size. The latter will be useful later for figuring out which repos use most space, which repos eat most into a user's quota. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
parent
b0a104d3d4
commit
250f87db59
2 changed files with 28 additions and 0 deletions
9
templates/swagger/v1_json.tmpl
generated
9
templates/swagger/v1_json.tmpl
generated
|
@ -17529,11 +17529,20 @@
|
|||
"description": "page size of results",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "order the repositories by name (default), id, or size",
|
||||
"name": "order_by",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/RepositoryList"
|
||||
},
|
||||
"422": {
|
||||
"$ref": "#/responses/validationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue