Deleting edit endpoint
This commit is contained in:
parent
93e164d7c2
commit
1d1c217258
@ -44,7 +44,7 @@ def get_all():
|
|||||||
Retreive a list of all MISP instances.
|
Retreive a list of all MISP instances.
|
||||||
:return: list of MISP instances in JSON.
|
:return: list of MISP instances in JSON.
|
||||||
"""
|
"""
|
||||||
res = MISP.get_instances()
|
res = MISP().get_instances()
|
||||||
return jsonify({"results": [i for i in res]})
|
return jsonify({"results": [i for i in res]})
|
||||||
|
|
||||||
|
|
||||||
@ -63,20 +63,3 @@ def get_iocs():
|
|||||||
data["limit"],
|
data["limit"],
|
||||||
data["page"])
|
data["page"])
|
||||||
return jsonify(res)
|
return jsonify(res)
|
||||||
|
|
||||||
|
|
||||||
@misp_bp.route('/edit', methods=['POST'])
|
|
||||||
@require_header_token
|
|
||||||
def edit_instance():
|
|
||||||
"""
|
|
||||||
Parse and edit the desired MISP instance.
|
|
||||||
:return: status of the operation in JSON
|
|
||||||
"""
|
|
||||||
data = json.loads(request.data)
|
|
||||||
instance = data["data"]["instance"]
|
|
||||||
res = MISP.edit_instance(instance["id"],
|
|
||||||
instance["name"],
|
|
||||||
instance["url"],
|
|
||||||
instance["apikey"],
|
|
||||||
instance["verifycert"])
|
|
||||||
return jsonify(res)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user