mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-22 14:22:33 +03:00
fix: 404 for empty pages
This commit is contained in:
parent
90ea60d698
commit
99a6113caa
@ -44,7 +44,7 @@ func GetThreads(c *gin.Context) {
|
||||
}
|
||||
|
||||
pagesCount := int(math.Ceil(float64(count) / 10))
|
||||
if page > pagesCount && len(threads) != 0 {
|
||||
if page > pagesCount && count != 0 {
|
||||
c.HTML(http.StatusNotFound, "404.html", nil)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user