communication over rabbitmq

This commit is contained in:
bvn13 2024-11-01 23:46:57 +03:00
parent 6c97e0c3f6
commit ea9037e9e7

View File

@ -39,7 +39,7 @@ def start(port: int, token: str, fucking_path: str, backup_path: str, rabbitmq:
@tornado.gen.coroutine @tornado.gen.coroutine
def post(self): def post(self):
req = json.loads(self.request.body) req = json.loads(self.request.body)
if not 'decision' in req or not 'text' in req: if not 'is_spam' in req or not 'text' in req:
self.set_status(400) self.set_status(400)
self.write(_json({ 'status': 'fail', 'message': 'wrong format' })) self.write(_json({ 'status': 'fail', 'message': 'wrong format' }))
else: else: