Skip to content

Commit

Permalink
Update bot access token if the org is already connected (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 authored May 31, 2023
1 parent bd1e479 commit 2922cb7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fyle_slack_app/slack/authorization/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ def get(self, request: HttpRequest) -> HttpResponseRedirect:
slack_team = utils.get_or_none(Team, id=team_id)

if slack_team is not None:
# Update bot access token
slack_team.bot_access_token = bot_access_token
slack_team.save()

# If slack team already exists means
# Slack bot is already installed in the workspace
# Send user a message that bot is already installed
Expand Down
10 changes: 10 additions & 0 deletions scripts/destroy-staging-db.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- rollback;
-- begin;

-- delete from notification_preferences;
-- delete from report_polling_details;
-- delete from teams;
-- delete from user_feedback_responses;
-- delete from user_feedbacks;
-- delete from user_subscription_details;
-- delete from users;

0 comments on commit 2922cb7

Please sign in to comment.