Move login.html outside of api

This commit is contained in:
Jan Bader 2016-11-23 22:08:13 +01:00
parent 73950eb6da
commit fb97208785

View File

@ -22,9 +22,12 @@ func main() {
//e.Use(middleware.Recover())
//e.Use(middleware.Static("static"))
router.GET("/login.html", login)
a := router.Group("/api/v1")
{
a.GET("/login", login)
a.GET("/login", func(c *gin.Context) {
c.Redirect(http.StatusPermanentRedirect, "/login.html")
})
a.POST("/login", loginPost)
// Unauthenticated routes