fix: 404 for empty pages

This commit is contained in:
Yanislav Igonin 2021-09-11 01:20:56 +03:00
parent 90ea60d698
commit 99a6113caa

View File

@ -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
}