aboutsummaryrefslogtreecommitdiff
path: root/api/test.py
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-03-23 19:44:43 +0100
committerlonkaars <l.leblansch@gmail.com>2021-03-23 19:44:43 +0100
commite2466a6e4cda8ade7d755beae2d74e13454e91fa (patch)
tree296dc6c576ea50211507060109fa5e8265dd7a68 /api/test.py
parent2e740cbf81f41804cdf7cf355c3d41de9eca2ac7 (diff)
auth_required decorator
Diffstat (limited to 'api/test.py')
-rw-r--r--api/test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/api/test.py b/api/test.py
new file mode 100644
index 0000000..ba62f00
--- /dev/null
+++ b/api/test.py
@@ -0,0 +1,12 @@
+from flask import Blueprint
+from hierarchy import auth_required
+
+test = Blueprint('test_endpoint', __name__)
+
+@test.route('/test')
+@auth_required("user")
+def index():
+ return "Hello World!"
+
+dynamic_route = ["/", test]
+