aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-17 13:09:25 +0100
committerSimon Ser <contact@emersion.fr>2019-12-17 13:09:25 +0100
commit38d73f57718e2990c411ad58a1e28c2adfd1ce1e (patch)
tree92d0a5ef8ac0ecbb13280b7175c191df9bafb928 /plugins
parente2d70ba6cab2e18063bd5b457cd861700cbbc9e7 (diff)
downloadalps-38d73f57718e2990c411ad58a1e28c2adfd1ce1e.tar.gz
alps-38d73f57718e2990c411ad58a1e28c2adfd1ce1e.zip
Use Context.FormParams
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/routes.go6
1 files changed, 4 insertions, 2 deletions
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")
}