Capstone/ui/controllers/controllers.go

22 lines
527 B
Go
Raw Normal View History

2023-10-28 14:42:29 -04:00
package controllers
import (
"git.preston-baxter.com/Preston_PLB/capstone/frontend-service/middleware"
"git.preston-baxter.com/Preston_PLB/capstone/frontend-service/templates"
"github.com/gin-gonic/gin"
)
func BuildRouter(r *gin.Engine) {
r.GET("/", middleware.AuthMiddleware(false) ,LandingPage)
r.GET("/login", middleware.AuthMiddleware(false), LoginPage)
}
func LandingPage(c *gin.Context) {
renderTempl(c, templates.LandingPage(false))
}
func LoginPage(c *gin.Context) {
renderTempl(c, templates.LoginPage())
}