mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-22 22:27:17 +00:00
fix: [api] fix crawler api
This commit is contained in:
parent
1254c1c9c0
commit
bacedfe643
1 changed files with 2 additions and 1 deletions
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue