Skip to content

Commit

Permalink
Merge pull request #60 from recoilme/21-design_frontpage
Browse files Browse the repository at this point in the history
frontpage and migrate
  • Loading branch information
recoilme committed Dec 1, 2022
2 parents cf8e8c1 + 2c10bf7 commit 2c21d0d
Show file tree
Hide file tree
Showing 10 changed files with 828 additions and 549 deletions.
8 changes: 5 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ func main() {

result, err := vsd.AllPosts(app, userId, c.QueryParam("page"))
if err != nil {
c.Set("err", err.Error())
log.Println("main", err.Error())
c.Set("err", " ")
c.Set("pagination", pagination.New(0, 0, 0))
} else {
c.Set("pagination", pagination.New(result.TotalItems, result.PerPage, result.Page))
}
c.Set("pagination", pagination.New(result.TotalItems, result.PerPage, result.Page))
c.Set("posts", toJson(result)["items"])
//c.Set("err", "In development")
return c.Render(http.StatusOK, "main.html", siteData(c))
},
Middlewares: []echo.MiddlewareFunc{
Expand Down
39 changes: 18 additions & 21 deletions migrations/1669001630_sheme.go

Large diffs are not rendered by default.

Loading

0 comments on commit 2c21d0d

Please sign in to comment.