feat: Add guide page

This commit is contained in:
2022-08-27 12:14:24 +02:00
parent 9553dbe252
commit 9c10e1b8fc
8 changed files with 157 additions and 9 deletions
+13 -1
View File
@@ -100,6 +100,11 @@ func routes(h handler.Service, r fiber.Router) {
return h.HandleNewsPage(c, CreateContext(c))
})
r.Get("/guide", func(c *fiber.Ctx) error {
c.Type("html")
return h.HandleGuidePage(c, CreateContext(c))
})
r.Post("/login", func(c *fiber.Ctx) error {
var loginForm struct {
Provider string `form:"provider"`
@@ -147,7 +152,14 @@ func routes(h handler.Service, r fiber.Router) {
articleID := c.Params("article")
c.Type("html")
return h.HandleArticlePage(c, articleID, CreateContext(c))
return h.HandleNewsArticlePage(c, articleID, CreateContext(c))
})
r.Get("/guide/:article", func(c *fiber.Ctx) error {
articleID := c.Params("article")
c.Type("html")
return h.HandleGuideArticlePage(c, articleID, CreateContext(c))
})
routesApi(h, r.Group("/api"))