Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update how we send data to Loomio #201

Open
shaunagm opened this issue Apr 28, 2022 · 0 comments
Open

Update how we send data to Loomio #201

shaunagm opened this issue Apr 28, 2022 · 0 comments
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

Comments

@shaunagm
Copy link
Collaborator

shaunagm commented Apr 28, 2022

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.)

@shaunagm shaunagm added enhancement New feature or request for metagov-core component: plugin New plugin request, or feature request on an existing plugin priority: low low priority labels Apr 28, 2022
@thelastjosh thelastjosh moved this from 🦑. Backlog to 🤠 Next up in Metagov Gateway + PolicyKit Nov 2, 2022
@thelastjosh thelastjosh moved this to 🦑. Backlog in Metagov Gateway + PolicyKit Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant