alphagov/backdrop — pull request #275 by paulfurley (2014-04-30 13:23:07+00:00)
Title: Refactor write api functions

- Use abort() for error handling:
- Also modify exception handler to extract the description from the HTTPError, rather than the name
- Refactor the way POSTs are validated and handled:
- split validation of data-set existence and authorization into two helpers
- rename _write_to_data_set to _append_to_data_set due to the fact that
it's called by a POST, and we will implement a "set" (PUT) later.
- change signature of _append_to_data_set to take data as an argument,
rather than the function extracting it from the global request object
(side effect, meh)