migration of open-etc-friends-pool for use with Etica/EGAZ
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
563 B

import Ember from 'ember';
import Payment from "../models/payment";
import config from '../config/environment';
export default Ember.Route.extend({
model: function() {
var url = config.APP.ApiUrl + 'api/payments';
return Ember.$.getJSON(url).then(function(data) {
if (data.payments) {
data.payments = data.payments.map(function(p) {
return Payment.create(p);
});
}
return data;
});
},
setupController: function(controller, model) {
this._super(controller, model);
Ember.run.later(this, this.refresh, 5000);
}
});