alphagov/govuk_need_api — pull request #9 by JordanHatch (2013-10-25 09:25:58+00:00)
Title: Save a history of revisions for a need

This changes the Need API to create a snapshot of a need every time a need is created or updated. Snapshots are persisted in a new model `NeedRevision`, which also stores details about the author who made the change.

Details about the author of a change are now required by the API on create. Author information is provided in a request body using the `author` key. The name, email and uid of the author can be saved, but only one of these is required.

If the author information isn't provided, the API will return a HTTP 422 status, along with an error message in the JSON response.