1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-22 06:15:02 +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
..
docs dspace_statistics_api/docs/index.html: Fix whitespace 2020-09-25 13:33:45 +03:00
__init__.py Refactor project structure 2018-10-28 11:14:21 +02:00
app.py Refactor /items POST handler to use a before hook 2020-09-26 18:40:52 +03:00
config.py Format code with black 2019-11-27 12:30:06 +02:00
database.py dspace_statistics_api: Use f-strings instead of format() 2020-03-02 11:24:29 +02:00
indexer.py dspace_statistics_api/indexer.py: Fix Python comment 2020-09-25 13:35:05 +03:00
items.py dspace_statistics_api/items.py: Fix flake8 warning 2020-09-26 12:22:06 +03:00
util.py Refactor /items POST handler to use a before hook 2020-09-26 18:40:52 +03:00