ti2 1.0.32 → 1.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,8 +24,7 @@ const queryAllotment = plugins => async (req, res, next) => {
24
24
  assert(userAppKeys, 'could not find the app key');
25
25
  const token = userAppKeys.appKey;
26
26
  assert(app.queryAllotment, 'could not find the allotment method');
27
- const search = app.queryAllotment;
28
- const results = await search({
27
+ const results = await app.queryAllotment({
29
28
  token,
30
29
  payload: query,
31
30
  });
@@ -58,7 +58,8 @@ const createAppToken = async (req, res, next) => {
58
58
  // create any cronjobs related to the app
59
59
  await bb.each(req.app.plugins, async plugin => {
60
60
  if (Array.isArray(plugin.jobs)) {
61
- await bb.each(plugin.jobs.filter(job => Boolean(job.cron)), async job => {
61
+ const validJobs = plugin.jobs.filter(job => Boolean(job.cron) && Boolean(job.method));
62
+ await bb.each(validJobs, async job => {
62
63
  const where = {
63
64
  pluginName: plugin.name,
64
65
  pluginJobId: job.method,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "Tourist Industry Exchange (TI2)",
5
5
  "main": "index.js",
6
6
  "scripts": {