Skip to content

Commit

Permalink
Fix #9 (Add to sort ctftime events)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryosan-470 committed Oct 12, 2016
1 parent 4efc422 commit 7dfee27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/ctftime.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ module.exports = (robot) ->
msg.send "Nothing event"
else
events = JSON.parse body
# sort key is event.start
sortEvents = (a, b) ->
a.start > b.start
events.sort sortEvents
for event in events
# Hide offline event
if event.location == ""
Expand Down

0 comments on commit 7dfee27

Please sign in to comment.