File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class Doorkeeper
6
6
7
7
def initialize
8
8
@client = EventService ::Client . new ( ENDPOINT ) do |c |
9
- c . authorization ( : Bearer, ENV . fetch ( 'DOORKEEPER_API_TOKEN' ) )
9
+ c . request :authorization , ' Bearer' , ENV . fetch ( 'DOORKEEPER_API_TOKEN' )
10
10
end
11
11
@default_since = '2010-07-01' . to_date . beginning_of_day
12
12
@default_until = Time . zone . yesterday . end_of_day
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ def initialize(dojos, period)
18
18
def run
19
19
@dojos . each do |dojo |
20
20
dojo . dojo_event_services . for ( :doorkeeper ) . each do |dojo_event_service |
21
- @client . fetch_events ( **@params . merge ( group_id : dojo_event_service . group_id ) ) . each do |e |
21
+ events = @client . fetch_events ( **@params . merge ( group_id : dojo_event_service . group_id ) )
22
+ ( events || [ ] ) . compact . each do |e |
22
23
next unless e [ 'group' ] . to_s == dojo_event_service . group_id
23
24
24
25
EventHistory . create! ( dojo_id : dojo . id ,
You can’t perform that action at this time.
0 commit comments