mirror of https://github.com/CIRCL/AIL-framework
fix: [api] fix crawler api
parent
1254c1c9c0
commit
bacedfe643
|
@ -561,7 +561,8 @@ def get_crawled_domain_list():
|
||||||
@token_required('analyst')
|
@token_required('analyst')
|
||||||
def add_crawler_task():
|
def add_crawler_task():
|
||||||
data = request.get_json()
|
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)
|
res = crawlers.api_add_crawler_task(data, user_id=user_id)
|
||||||
if res:
|
if res:
|
||||||
return create_json_response(res[0], res[1])
|
return create_json_response(res[0], res[1])
|
||||||
|
|
Loading…
Reference in New Issue