diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2020-11-16 21:58:37 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2020-11-16 21:58:37 +0100 |
commit | 11ba78d00d86e8cc8e53e0cf333eaccb2b51e2f7 (patch) | |
tree | 7749790418218e2bbfc93936ef92c61e1770491f /inventory | |
parent | b03234567aa2069f777a7a5d38a2ae0bc0d7ebc5 (diff) |
api: Decorate auth wrapper with functools.wraps
Diffstat (limited to 'inventory')
-rw-r--r-- | inventory/api.py | 2 |
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: |