mirror of
https://gitee.com/gitea/gitea
synced 2026-01-03 14:16:36 +08:00
changed integrated page number to GET
This commit is contained in:
@@ -19,21 +19,21 @@ const (
|
||||
func Stars(ctx *middleware.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("repos.stars")
|
||||
|
||||
page := ctx.ParamsInt(":index")
|
||||
page := ctx.QueryInt("page")
|
||||
if page <= 0 {
|
||||
page = 1
|
||||
}
|
||||
|
||||
ctx.Data["Page"] = paginater.New(ctx.Repo.Repository.NumStars, models.ItemsPerPage, page, 5)
|
||||
|
||||
stars, err := ctx.Repo.Repository.GetStars(ctx.ParamsInt(":index"))
|
||||
stars, err := ctx.Repo.Repository.GetStars(ctx.QueryInt("page"))
|
||||
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetStars", err)
|
||||
return
|
||||
}
|
||||
|
||||
if (ctx.ParamsInt(":index")-1)*models.ItemsPerPage > ctx.Repo.Repository.NumStars {
|
||||
if (ctx.QueryInt("page")-1)*models.ItemsPerPage > ctx.Repo.Repository.NumStars {
|
||||
ctx.Handle(404, "ctx.Repo.Repository.NumStars", nil)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user