Update how we send data to Loomio #201
Labels
component: plugin
New plugin request, or feature request on an existing plugin
enhancement
New feature or request for metagov-core
priority: low
low priority
I've spent a fair amount of time tracking down a bug with how we're talking to the Loomio API (see here for more details). The Loomio policy we built for the community is now working, but in a slightly hacky way.
Basically, there's two ways of communicating with the API. The preferred is through JSON. If we send as form data, arrays need to have key names like "emails[]" instead of "emails". The better and more elegant way to handle this is to strip all the [] from our variable names and just send as JSON. But right now we instead meticulously add [] to array variables and send as form data.
This should be a relatively easy fix, I just don't have time right now, and also after having finally (finally!) gotten this policy working I don't want to mess with it.
(Here's the relevant gateway code.)
The text was updated successfully, but these errors were encountered: