mirror of https://github.com/MISP/misp-modules
fix: [server] Serializing PyMISP objects
parent
9446fd2ac6
commit
5b57b8b296
|
@ -39,6 +39,7 @@ import tornado.process
|
||||||
from tornado.ioloop import IOLoop
|
from tornado.ioloop import IOLoop
|
||||||
from tornado.concurrent import run_on_executor
|
from tornado.concurrent import run_on_executor
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
from pymisp import pymisp_json_default
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from .modules import * # noqa
|
from .modules import * # noqa
|
||||||
|
@ -202,7 +203,7 @@ class QueryModule(tornado.web.RequestHandler):
|
||||||
response = module.dict_handler(request=dict_payload)
|
response = module.dict_handler(request=dict_payload)
|
||||||
else:
|
else:
|
||||||
response = module.handler(q=json_payload)
|
response = module.handler(q=json_payload)
|
||||||
return json.dumps(response)
|
return json.dumps(response, default=pymisp_json_default)
|
||||||
|
|
||||||
@tornado.gen.coroutine
|
@tornado.gen.coroutine
|
||||||
def post(self):
|
def post(self):
|
||||||
|
|
Loading…
Reference in New Issue