diff options
Diffstat (limited to 'app/controllers/basic.go')
-rw-r--r-- | app/controllers/basic.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/basic.go b/app/controllers/basic.go new file mode 100644 index 0000000..eff97e1 --- /dev/null +++ b/app/controllers/basic.go | |||
@@ -0,0 +1,17 @@ | |||
1 | package controllers | ||
2 | |||
3 | import ( | ||
4 | "net/http" | ||
5 | |||
6 | glecho "code.crute.us/mcrute/golib/echo" | ||
7 | "github.com/labstack/echo/v4" | ||
8 | ) | ||
9 | |||
10 | func IndexHandler(c echo.Context) error { | ||
11 | return c.Render(http.StatusOK, "index.tpl", nil) | ||
12 | } | ||
13 | |||
14 | func LogoutHandler(c echo.Context) error { | ||
15 | glecho.DeleteAllCookies(c) | ||
16 | return c.Redirect(http.StatusFound, "/") | ||
17 | } | ||