From 38d73f57718e2990c411ad58a1e28c2adfd1ce1e Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 17 Dec 2019 13:09:25 +0100 Subject: Use Context.FormParams --- plugins/base/routes.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/base') diff --git a/plugins/base/routes.go b/plugins/base/routes.go index d73dfea..bf1b90d 100644 --- a/plugins/base/routes.go +++ b/plugins/base/routes.go @@ -347,6 +347,7 @@ func handleCompose(ectx echo.Context) error { } // TODO: append to IMAP Sent mailbox + // TODO: add \Answered flag to original IMAP message return ctx.Redirect(http.StatusFound, "/mailbox/INBOX") } @@ -439,10 +440,11 @@ func handleSetFlags(ectx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, err) } - if err := ctx.Request().ParseForm(); err != nil { + form, err := ctx.FormParams() + if err != nil { return echo.NewHTTPError(http.StatusBadRequest, err) } - flags, ok := ctx.Request().Form["flags"] + flags, ok := form["flags"] if !ok { return echo.NewHTTPError(http.StatusBadRequest, "missing 'flags' form values") } -- cgit v1.2.3