diff options
author | 2019-12-03 14:33:20 +0100 | |
---|---|---|
committer | 2019-12-03 14:34:15 +0100 | |
commit | 9f6b086f62c9da8901d3f021aa65cc13661e1e45 (patch) | |
tree | dfcd94a7962e3c9c4c1b47ca60077a2268c2ebf7 /server.go | |
parent | e62b48caa8e7664ffbed41e9f7c10b90f18fca8b (diff) | |
download | alps-9f6b086f62c9da8901d3f021aa65cc13661e1e45.tar.gz alps-9f6b086f62c9da8901d3f021aa65cc13661e1e45.tar.bz2 alps-9f6b086f62c9da8901d3f021aa65cc13661e1e45.zip |
Add compose view
Diffstat (limited to 'server.go')
-rw-r--r-- | server.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -154,6 +154,11 @@ func handleGetPart(ctx *context, raw bool) error { }) } +func handleCompose(ectx echo.Context) error { + ctx := ectx.(*context) + return ctx.Render(http.StatusOK, "compose.html", nil) +} + func New(imapURL string) *echo.Echo { e := echo.New() @@ -247,6 +252,9 @@ func New(imapURL string) *echo.Echo { return ctx.Redirect(http.StatusFound, "/login") }) + e.GET("/compose", handleCompose) + e.POST("/compose", handleCompose) + e.Static("/assets", "public/assets") return e |