Added auth to the container.
This commit is contained in:
parent
c9d50cb3d4
commit
a33a76f8bc
9 changed files with 81 additions and 32 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue