Skip to content

Commit

Permalink
renamed bot tokens to tokens for further clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
ktjayamanna committed Jan 21, 2025
1 parent 4f9e879 commit a4f9cf2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/onyx/server/manage/slack_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,13 @@ def get_all_channels_from_slack_api(
db_session: Session = Depends(get_session),
_: User | None = Depends(current_admin_user),
) -> Dict[str, str]:
bot_tokens = fetch_slack_bot_tokens(db_session, bot_id)
if not bot_tokens or "bot_token" not in bot_tokens:
tokens = fetch_slack_bot_tokens(db_session, bot_id)
if not tokens or "bot_token" not in tokens:
raise HTTPException(
status_code=404, detail="Bot token not found for the given bot ID"
)

bot_token = bot_tokens["bot_token"]
bot_token = tokens["bot_token"]
client = WebClient(token=bot_token)

try:
Expand Down

0 comments on commit a4f9cf2

Please sign in to comment.