summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorkendaru <soud@protonmail.com>2015-10-02 10:04:11 +0200
committerkendaru <soud@protonmail.com>2015-10-02 10:04:11 +0200
commit5c39d3fa7dfcb81bdaed222a73c8a7d3dd807e36 (patch)
treea1998d60ea8b59aad6ac6710d2103bddb3675ed8 /routers
parent87d64acc9f7de985603093980c8dc3fa651047a1 (diff)
downloadgitea-5c39d3fa7dfcb81bdaed222a73c8a7d3dd807e36.tar.gz
gitea-5c39d3fa7dfcb81bdaed222a73c8a7d3dd807e36.zip
changed integrated page number to GET
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/stars.go6
-rw-r--r--routers/repo/watchers.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/routers/repo/stars.go b/routers/repo/stars.go
index ffccd1765b..93854886c0 100644
--- a/routers/repo/stars.go
+++ b/routers/repo/stars.go
@@ -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
}
diff --git a/routers/repo/watchers.go b/routers/repo/watchers.go
index 8765b18376..8626fa2371 100644
--- a/routers/repo/watchers.go
+++ b/routers/repo/watchers.go
@@ -19,21 +19,21 @@ const (
func Watchers(ctx *middleware.Context) {
ctx.Data["Title"] = ctx.Tr("repos.watches")
- page := ctx.ParamsInt(":index")
+ page := ctx.QueryInt("page")
if page <= 0 {
page = 1
}
ctx.Data["Page"] = paginater.New(ctx.Repo.Repository.NumWatches, models.ItemsPerPage, page, 5)
- watchers, err := ctx.Repo.Repository.GetWatchers(ctx.ParamsInt(":index"))
+ watchers, err := ctx.Repo.Repository.GetWatchers(ctx.QueryInt("page"))
if err != nil {
ctx.Handle(500, "GetWatchers", err)
return
}
- if (ctx.ParamsInt(":index")-1)*models.ItemsPerPage > ctx.Repo.Repository.NumWatches {
+ if (ctx.QueryInt("page")-1)*models.ItemsPerPage > ctx.Repo.Repository.NumWatches {
ctx.Handle(404, "ctx.Repo.Repository.NumWatches", nil)
return
}