DEVELOPMENT ENVIRONMENT

~liljamo/tixe

6124b16e89cc33cf9e3b2df29c709b1f1465ac53 — Jonni Liljamo 11 months ago 7746581
fix: abort if not logged in...
1 files changed, 1 insertions(+), 0 deletions(-)

M middlewares/auth.go
M middlewares/auth.go => middlewares/auth.go +1 -0
@@ 17,6 17,7 @@ func IsAuthenticated(c *gin.Context) {
	if sessions.Default(c).Get("profile") == nil {
		// TODO: This should probably be validated somehow... DB lookup or something.
		c.Redirect(http.StatusSeeOther, "/login")
		c.Abort()
	} else {
		c.Next()
	}