aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/requests.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/requests.py')
-rw-r--r--gn_auth/auth/requests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gn_auth/auth/requests.py b/gn_auth/auth/requests.py
new file mode 100644
index 0000000..6301029
--- /dev/null
+++ b/gn_auth/auth/requests.py
@@ -0,0 +1,6 @@
+"""Utilities to deal with requests."""
+from flask import request
+
+def request_json() -> dict:
+ """Retrieve the JSON sent in a request."""
+ return request.json or {}