From 11ba78d00d86e8cc8e53e0cf333eaccb2b51e2f7 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 16 Nov 2020 21:58:37 +0100 Subject: api: Decorate auth wrapper with functools.wraps --- inventory/api.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inventory') 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: -- cgit v1.2.3