19 lines
337 B
Go
19 lines
337 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"github.com/labstack/echo"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func logout(c echo.Context) error {
|
||
|
rw := c.Response()
|
||
|
r := c.Request()
|
||
|
|
||
|
//Session auf nil setzen zum ausloggen
|
||
|
sess := GlobalSessions.SessionStart(rw, r)
|
||
|
sess.Set("login", nil)
|
||
|
|
||
|
//Auf die adminseite weiterleiten
|
||
|
return c.Redirect(http.StatusSeeOther, "/admin")
|
||
|
}
|