Visual-Communications / fair-housing-pledge

https://fairhousingpledge.com/
0 stars 0 forks source link

#93: Add updatePledge() method #95

Closed paulshryock closed 3 years ago

paulshryock commented 3 years ago

Summary

Adds a PUT method to the /api/pledges route to bulk-update multiple pledges at once. Requires a request body including an object with to and from object keys containing whatever change to make, like this:

{
    "from": {
      "courseCompleted": "N/A"
    },
    "to": {
      "courseCompleted": false
    }
}

The above example would change all pledges with courseCompleted set to N/A to now have it set to false.

Issue(s)

Closes #93

Changelog

Added

Checklist