Skip to content

Commit

Permalink
fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
cookie-s committed Apr 30, 2023
1 parent fc52c13 commit 9fab1f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions bin/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
'uri' => 'mongo:27017',
'database' => 'slack_logger'
},
'rack' => { # TODO: unnecessary?
'secret' => SecureRandom.hex
}
}

OptionParser.new do |opts|
Expand Down
5 changes: 4 additions & 1 deletion lib/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def self.config

{
slack: {
token: value('slack', 'token')
token: value('slack', 'token'),
team_id: value('slack', 'team_id'),
use_events_api: value('slack', 'use_events_api'),
signing_secret: value('slack', 'signing_secret'),
},
aws: {
access_key_id: value('aws', 'access_key_id'),
Expand Down
2 changes: 1 addition & 1 deletion lib/slack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
end

Slack::Events.configure do |c|
c.signing_secret = config['slack']['use_events_api'] ? config['slack']['signing_secret'] : nil
c.signing_secret = config[:slack][:use_events_api] ? config[:slack][:signing_secret] : nil
end

module SlackPatron
Expand Down

0 comments on commit 9fab1f0

Please sign in to comment.