diff options
Diffstat (limited to 'ick2/controllerapi.py')
-rw-r--r-- | ick2/controllerapi.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ick2/controllerapi.py b/ick2/controllerapi.py index af387ec..70877f1 100644 --- a/ick2/controllerapi.py +++ b/ick2/controllerapi.py @@ -65,6 +65,8 @@ class ControllerAPI: def get_callback(self, callback): # pragma: no cover def wrapper(content_type, body, **kwargs): try: + if 'raw_uri_path' in kwargs: + del kwargs['raw_uri_path'] body = callback(**kwargs) except ick2.NotFound as e: return apifw.Response({ @@ -82,7 +84,7 @@ class ControllerAPI: return wrapper def post_callback(self, callback): # pragma: no cover - def wrapper(content_type, body): + def wrapper(content_type, body, **kwargs): body = callback(body) ick2.log.log('trace', msg_text='returned body', body=repr(body)) return apifw.Response({ @@ -96,6 +98,8 @@ class ControllerAPI: def put_callback(self, callback): # pragma: no cover def wrapper(content_type, body, **kwargs): + if 'raw_uri_path' in kwargs: + del kwargs['raw_uri_path'] body = callback(body, **kwargs) ick2.log.log('trace', msg_text='returned body', body=repr(body)) return apifw.Response({ |