From 286725b98d9200e6e474fca299a2da3df40c4a07 Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 16 Oct 2024 17:08:05 +0200 Subject: [PATCH] :art: accept reject reason sa body instead of param --- app/routes/connections.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/routes/connections.py b/app/routes/connections.py index 8721791e2..8dcc67ff6 100644 --- a/app/routes/connections.py +++ b/app/routes/connections.py @@ -426,7 +426,7 @@ async def accept_did_exchange_request( ) async def reject_did_exchange( connection_id: str, - reason: Optional[str] = None, + body: Optional[DIDXRejectRequest] = None, auth: AcaPyAuth = Depends(acapy_auth_from_header), ) -> Connection: """ @@ -443,14 +443,12 @@ async def reject_did_exchange( bound_logger = logger.bind(body={"connection_id": connection_id}) bound_logger.debug("POST request received: Reject DID exchange") - reject_request_body = DIDXRejectRequest(reason=reason) if reason else None - async with client_from_auth(auth) as aries_controller: connection_record = await handle_acapy_call( logger=bound_logger, acapy_call=aries_controller.did_exchange.reject, conn_id=connection_id, - body=reject_request_body, + body=body, ) result = conn_record_to_connection(connection_record)