mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-23 10:35:04 +08:00
Remove deprecated query condition in ListReleases (#28339)
close #24057 call stack:25faee3c5f/routers/api/v1/repo/release.go (L154)
ec1feedbf5/routers/api/v1/utils/page.go (L13-L18)
ec1feedbf5/services/convert/utils.go (L15-L22)
## ⚠️ Breaking ⚠️ (though it's not caused by this PR) Do not use `per_page` to specify pagination; use `limit` instead
This commit is contained in:
parent
38a93a0665
commit
0aab2d38a7
|
@ -133,11 +133,6 @@ func ListReleases(ctx *context.APIContext) {
|
||||||
// in: query
|
// in: query
|
||||||
// description: filter (exclude / include) pre-releases
|
// description: filter (exclude / include) pre-releases
|
||||||
// type: boolean
|
// type: boolean
|
||||||
// - name: per_page
|
|
||||||
// in: query
|
|
||||||
// description: page size of results, deprecated - use limit
|
|
||||||
// type: integer
|
|
||||||
// deprecated: true
|
|
||||||
// - name: page
|
// - name: page
|
||||||
// in: query
|
// in: query
|
||||||
// description: page number of results to return (1-based)
|
// description: page number of results to return (1-based)
|
||||||
|
@ -152,9 +147,6 @@ func ListReleases(ctx *context.APIContext) {
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
listOptions := utils.GetListOptions(ctx)
|
listOptions := utils.GetListOptions(ctx)
|
||||||
if listOptions.PageSize == 0 && ctx.FormInt("per_page") != 0 {
|
|
||||||
listOptions.PageSize = ctx.FormInt("per_page")
|
|
||||||
}
|
|
||||||
|
|
||||||
opts := repo_model.FindReleasesOptions{
|
opts := repo_model.FindReleasesOptions{
|
||||||
ListOptions: listOptions,
|
ListOptions: listOptions,
|
||||||
|
|
6
templates/swagger/v1_json.tmpl
generated
6
templates/swagger/v1_json.tmpl
generated
|
@ -11728,12 +11728,6 @@
|
||||||
"name": "pre-release",
|
"name": "pre-release",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "page size of results, deprecated - use limit",
|
|
||||||
"name": "per_page",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "page number of results to return (1-based)",
|
"description": "page number of results to return (1-based)",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user