From bacedfe643976747f820fbb2904c5d46446c9107 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Wed, 14 Sep 2022 10:16:34 +0200 Subject: [PATCH] fix: [api] fix crawler api --- var/www/modules/restApi/Flask_restApi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/www/modules/restApi/Flask_restApi.py b/var/www/modules/restApi/Flask_restApi.py index fb9dda5b..70600e66 100644 --- a/var/www/modules/restApi/Flask_restApi.py +++ b/var/www/modules/restApi/Flask_restApi.py @@ -561,7 +561,8 @@ def get_crawled_domain_list(): @token_required('analyst') def add_crawler_task(): data = request.get_json() - user_id = get_user_from_token(token) + user_token = get_auth_from_header() + user_id = get_user_from_token(user_token) res = crawlers.api_add_crawler_task(data, user_id=user_id) if res: return create_json_response(res[0], res[1])