1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2025-01-10 21:13:21 +01:00
dspace-statistics-api/dspace_statistics_api
Alan Orth 5a53b57b3b
Refactor /items POST handler to use a before hook
This allows us to do the dirty work of parsing, validating, and
setting local variables from the POST parameters outside of the
on_post function. We then share the parameters via the req.context
object. Functionally it is the same, but readability is better
and it's a neat trick that I could use elsewhere.

See: https://falcon.readthedocs.io/en/stable/user/faq.html#how-can-i-pass-data-from-a-hook-to-a-responder-and-between-hooks
2020-09-26 18:40:52 +03:00
..
2018-10-28 11:14:21 +02:00
2019-11-27 12:30:06 +02:00