20 lines
312 B
Go
20 lines
312 B
Go
package controllers
|
|
|
|
import (
|
|
"git.readonly.ch/bouzoure/pop-camarades/helpers"
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func LogoutProcess(c *fiber.Ctx) error {
|
|
sess, err := helpers.GetSessionStore(c)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
err = sess.Destroy()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return c.Redirect("/")
|
|
}
|