From dc8f539ace8e605586bda18934b60d50563c8e71 Mon Sep 17 00:00:00 2001 From: Robert Rosca <32569096+RobertRosca@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:08:47 +0100 Subject: [PATCH] feat(mymdc): return full response dict from get zulip bot credentials --- src/zulip_write_only_proxy/mymdc.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/zulip_write_only_proxy/mymdc.py b/src/zulip_write_only_proxy/mymdc.py index dc3809b5..e485613f 100644 --- a/src/zulip_write_only_proxy/mymdc.py +++ b/src/zulip_write_only_proxy/mymdc.py @@ -138,17 +138,10 @@ async def get_zulip_stream_name(self, proposal_no: int) -> str: return res - async def get_zulip_bot_credentials( - self, proposal_no: int - ) -> tuple[int, str, str, str]: + async def get_zulip_bot_credentials(self, proposal_no: int) -> dict: res = (await self.get(f"/api/proposals/{proposal_no}/logbook_bot")).json() if res is None: raise NoStreamForProposalError(proposal_no) - return ( - res.get("bot_id"), - res.get("bot_key"), - res.get("bot_email"), - res.get("bot_site"), - ) + return res