fix: Reenable -p and --limit switches (#778)

Reduced version of #776, without the new tests.

Fixes #771.

Reviewed-on: https://gitea.com/gitea/tea/pulls/778
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Kirill Müller <kirill@cynkra.com>
Co-committed-by: Kirill Müller <kirill@cynkra.com>
This commit is contained in:
Kirill Müller
2025-07-14 14:28:35 +00:00
committed by techknowlogick
parent 8212d5f527
commit 15052b4dcc
2 changed files with 61 additions and 59 deletions

View File

@ -36,17 +36,19 @@ var OutputFlag = cli.StringFlag{
}
// PaginationPageFlag provides flag for pagination options
var PaginationPageFlag = cli.StringFlag{
var PaginationPageFlag = cli.IntFlag{
Name: "page",
Aliases: []string{"p"},
Usage: "specify page, default is 1",
Usage: "specify page",
Value: 1,
}
// PaginationLimitFlag provides flag for pagination options
var PaginationLimitFlag = cli.StringFlag{
var PaginationLimitFlag = cli.IntFlag{
Name: "limit",
Aliases: []string{"lm"},
Usage: "specify limit of items per page",
Value: 30,
}
// LoginOutputFlags defines login and output flags that should