Added auth to the container.

This commit is contained in:
mikestefanello 2021-12-15 09:29:43 -05:00
parent c9d50cb3d4
commit a33a76f8bc
9 changed files with 81 additions and 32 deletions

View file

@ -1,7 +1,6 @@
package routes
import (
"goweb/auth"
"goweb/controller"
"goweb/msg"
@ -13,7 +12,7 @@ type Logout struct {
}
func (l *Logout) Get(c echo.Context) error {
if err := auth.Logout(c); err == nil {
if err := l.Container.Auth.Logout(c); err == nil {
msg.Success(c, "You have been logged out successfully.")
}
return l.Redirect(c, "home")