Unverified Commit af59a773 authored by Daniel's avatar Daniel Committed by GitHub

Added logging to update bookmark API (#189)

parent 71383b15
...@@ -514,6 +514,11 @@ def update_bookmark() -> Response: ...@@ -514,6 +514,11 @@ def update_bookmark() -> Response:
:param key: Resource key for the bookmarked item. :param key: Resource key for the bookmarked item.
:return: :return:
""" """
@action_logging
def _log_update_bookmark(*, resource_key: str, resource_type: str, method: str) -> None:
pass # pragma: no cover
try: try:
if app.config['AUTH_USER_METHOD']: if app.config['AUTH_USER_METHOD']:
user = app.config['AUTH_USER_METHOD'](app) user = app.config['AUTH_USER_METHOD'](app)
...@@ -530,6 +535,8 @@ def update_bookmark() -> Response: ...@@ -530,6 +535,8 @@ def update_bookmark() -> Response:
resource_type, resource_type,
resource_key) resource_key)
_log_update_bookmark(resource_key=resource_key, resource_type=resource_type, method=request.method)
response = request_metadata(url=url, method=request.method) response = request_metadata(url=url, method=request.method)
status_code = response.status_code status_code = response.status_code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment