aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server.go')
-rw-r--r--server.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/server.go b/server.go
index c6d61e8..4156724 100644
--- a/server.go
+++ b/server.go
@@ -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