diff --git a/controllers/threads_controller.go b/controllers/threads_controller.go index 232a702..20fca75 100644 --- a/controllers/threads_controller.go +++ b/controllers/threads_controller.go @@ -12,8 +12,7 @@ import ( ) func GetThreads(c *gin.Context) { - // TODO: fix empty query - pageString := c.Query("page") + pageString := c.DefaultQuery("page", "1") page, err := strconv.Atoi(pageString) if err != nil { log.Println("error:", err)