Skip to content

Commit

Permalink
fix(packages): use store.query instead of store.findAll to filter…
Browse files Browse the repository at this point in the history
… by billing type`
  • Loading branch information
velrest committed Dec 29, 2021
1 parent 01df5e3 commit a4d3e4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions frontend/app/services/timed.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export default class TimedService extends Service {
});
}

async getReloadPackages(billing_type) {
const packages = await this.store.findAll("subscription-package", {
billing_type,
async getReloadPackages(billingType) {
const packages = await this.store.query("subscription-package", {
billing_type: billingType,
});

const REGEX_PRICE = /^Fr\./;
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/subscriptions/reload/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default class SubscriptionsReloadRoute extends Route {
// Customers get a list of packages to choose from.
let packages = [];
if (this.account.isInGroup(ENV.auth.customerRole)) {
const billing_type = project.billingType.get("id");
packages = await this.timed.getReloadPackages(billing_type);
const billingType = project.billingType.get("id");
packages = await this.timed.getReloadPackages(billingType);
}

return {
Expand Down

0 comments on commit a4d3e4f

Please sign in to comment.