fix: [api] fix crawler api

This commit is contained in:
Terrtia 2022-09-14 10:16:34 +02:00
parent 1254c1c9c0
commit bacedfe643
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -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])