filter out expired broadcasts
This commit is contained in:
parent
1bbceeaf13
commit
10a747d2ac
|
@ -28,7 +28,9 @@ Controller = Ember.Controller.extend
|
||||||
options.headers = { Authorization: "token #{@auth.token()}" }
|
options.headers = { Authorization: "token #{@auth.token()}" }
|
||||||
|
|
||||||
$.ajax("#{apiEndpoint}/v3/broadcasts", options).then (response) ->
|
$.ajax("#{apiEndpoint}/v3/broadcasts", options).then (response) ->
|
||||||
array = response.broadcasts.map( (broadcast) ->
|
array = response.broadcasts.filter((broadcast) ->
|
||||||
|
broadcast unless broadcast.expired
|
||||||
|
).map( (broadcast) ->
|
||||||
Ember.Object.create(broadcast)
|
Ember.Object.create(broadcast)
|
||||||
).reverse()
|
).reverse()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user