Skip to content

Commit

Permalink
remove redundant code and excludeTopic-->excludeEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
prabalsingh24 committed Jun 8, 2020
1 parent c2f31c0 commit 2e4bc08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion api/graphql/query/Resource/availability.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ZoomAccountAvailability extends BaseResolver {
start_at: topic.start_at,
end_at: topic.end_at,
},
excludeTopics: [topic.id],
excludeEvents: [topic.id],
});
}

Expand Down
15 changes: 0 additions & 15 deletions api/services/ZoomAccount/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Models from 'Models';
import DataLoader from 'dataloader';
import BaseModelService, {
saveInstance,
requireInstance,
Expand All @@ -20,20 +19,6 @@ export default class ZoomAccount extends BaseModelService {
return !data;
}

static async findAllAvailabilityDuring(keys) {
const { id, dateTimeRange, ...options } = keys[0];
return Models.ZoomAccount.findAll({
where: {
id: {
[Models.Sequelize.Op.in]: keys.map(({ id }) => id),
},
},
...utilizedResourceClause(dateTimeRange, options),
}).then((accounts) =>
keys.map((key) => !accounts.find((account) => key.id === account.id)),
);
}

static getAvailabilityLoader = Availability.loader();

@requireInstance
Expand Down

0 comments on commit 2e4bc08

Please sign in to comment.