From 219bbfb9986bd6c96838f5a376afb524ca3b2cdc Mon Sep 17 00:00:00 2001 From: jacekv Date: Tue, 26 Nov 2024 21:20:45 +0100 Subject: [PATCH] PAN-2339: Reversing some other code for test --- openapi.py | 5 ++++- pantos/servicenode/restapi.py | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/openapi.py b/openapi.py index d5578ca..dbd2e75 100644 --- a/openapi.py +++ b/openapi.py @@ -10,7 +10,9 @@ from pantos.servicenode.restapi import _BidSchema from pantos.servicenode.restapi import _BidsSchema +from pantos.servicenode.restapi import _TransferResponseSchema from pantos.servicenode.restapi import _TransferSchema +from pantos.servicenode.restapi import _TransferStatusResponseSchema from pantos.servicenode.restapi import _TransferStatusSchema from pantos.servicenode.restapi import flask_app @@ -24,7 +26,8 @@ template = spec.to_flasgger( flask_app, definitions=[ - _BidSchema, _BidsSchema, _TransferSchema, _TransferStatusSchema + _BidSchema, _BidsSchema, _TransferSchema, _TransferResponseSchema, + _TransferStatusSchema, _TransferStatusResponseSchema ]) swagger = Swagger(flask_app, template=template, parse=True) diff --git a/pantos/servicenode/restapi.py b/pantos/servicenode/restapi.py index f1ae2e7..61fd556 100644 --- a/pantos/servicenode/restapi.py +++ b/pantos/servicenode/restapi.py @@ -362,7 +362,8 @@ def get(self, task_id: str) -> flask.Response: exc_info=True) internal_server_error() - response = _TransferStatusResponseSchema().load({ + # response = _TransferStatusResponseSchema().load({ + return ok_response({ 'task_id': str(task_id_uuid), 'source_blockchain_id': find_transfer_response.source_blockchain. value, @@ -383,7 +384,7 @@ def get(self, task_id: str) -> flask.Response: 'transaction_id': '' if find_transfer_response.transaction_id is None else find_transfer_response.transaction_id }) - return response + # return response class _Bids(flask_restful.Resource):