Skip to content

Commit

Permalink
feat(mymdc): return full response dict from get zulip bot credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertRosca committed Sep 24, 2024
1 parent d1f4372 commit 11452da
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/zulip_write_only_proxy/mymdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 11452da

Please sign in to comment.