summaryrefslogtreecommitdiff
path: root/inventory
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2020-11-16 21:58:37 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2020-11-16 21:58:37 +0100
commit11ba78d00d86e8cc8e53e0cf333eaccb2b51e2f7 (patch)
tree7749790418218e2bbfc93936ef92c61e1770491f /inventory
parentb03234567aa2069f777a7a5d38a2ae0bc0d7ebc5 (diff)
api: Decorate auth wrapper with functools.wraps
Diffstat (limited to 'inventory')
-rw-r--r--inventory/api.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/inventory/api.py b/inventory/api.py
index fa09a68..ef05e33 100644
--- a/inventory/api.py
+++ b/inventory/api.py
@@ -1,4 +1,5 @@
import datetime
+import functools
import time
from bson import ObjectId
@@ -49,6 +50,7 @@ def on_validation_error(e):
def auth_required(f):
+ @functools.wraps(f)
def wrapper(*args, **kwargs):
authorization = request.headers.get('Authorization')
if not authorization: