nodebb-plugin-calendar-onekite 10.0.14 → 10.0.15

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.
Files changed (2) hide show
  1. package/library.js +10 -3
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -319,6 +319,9 @@ plugin.init = async function (params) {
319
319
  const { router, middleware } = params;
320
320
  const settings = await getSettings();
321
321
 
322
+ try {
323
+
324
+
322
325
  // Page route: /calendar
323
326
  router.get('/calendar', middleware.buildHeader, async (req, res) => {
324
327
  if (!settings.enabled) {
@@ -339,13 +342,13 @@ plugin.init = async function (params) {
339
342
  if (!isAdmin) return res.status(403).send('Forbidden');
340
343
  next();
341
344
  } catch (e) {
342
- res.status(500).send(e.message);
345
+ return res.status(500).send(e.message);
343
346
  }
344
347
  }, adminBuild, async (req, res) => {
345
- // Use NodeBB helper so ajaxify data contains template info
346
- return helpers.renderAdmin(req, res, 'admin/plugins/calendar-onekite', { title: 'Calendar OneKite' });
348
+ return res.render('admin/plugins/calendar-onekite', { title: 'Calendar OneKite' });
347
349
  });
348
350
 
351
+
349
352
  });
350
353
 
351
354
  // API: events
@@ -593,6 +596,10 @@ plugin.init = async function (params) {
593
596
 
594
597
  res.json({ deleted: toDelete.length });
595
598
  });
599
+ } catch (e) {
600
+ console.error('[calendar-onekite] init error', e);
601
+ }
602
+
596
603
  };
597
604
 
598
605
  plugin.addAdminNavigation = async function (header) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-calendar-onekite",
3
- "version": "10.0.14",
3
+ "version": "10.0.15",
4
4
  "description": "NodeBB calendar booking plugin using FullCalendar and HelloAsso checkout intents",
5
5
  "main": "library.js",
6
6
  "license": "MIT",