discourse-subscriptions/assets/javascripts/discourse/routes/user-billing.js.es6

16 lines
388 B
Plaintext
Raw Normal View History

2019-12-02 02:58:14 -05:00
import Invoice from "discourse/plugins/discourse-subscriptions/discourse/models/invoice";
2019-10-27 23:05:58 -04:00
2019-10-24 22:23:32 -04:00
export default Discourse.Route.extend({
model() {
2019-10-27 23:05:58 -04:00
return Invoice.findAll();
2019-10-24 22:23:32 -04:00
},
setupController(controller, model) {
if (this.currentUser.id !== this.modelFor("user").id) {
this.replaceWith("userActivity");
2019-10-24 23:00:59 -04:00
} else {
2019-10-24 22:23:32 -04:00
controller.setProperties({ model });
2019-10-24 23:00:59 -04:00
}
2019-10-24 22:23:32 -04:00
}
});