nodebb-plugin-equipment-calendar 0.8.1 → 0.8.2

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.
package/library.js CHANGED
@@ -161,11 +161,7 @@ async function createHelloAssoCheckoutIntent(settings, bookingId, reservations)
161
161
  },
162
162
  };
163
163
 
164
- const token = const force = String(req.query.force || '') === '1';
165
- const clear = String(req.query.clear || '') === '1';
166
- // force=1 skips in-memory cache and refresh_token; clear=1 wipes stored refresh token
167
- haTokenCache = null;
168
- await getHelloAssoAccessToken(settings, { force, clearStored: clear });
164
+ const token = await getHelloAssoAccessToken(settings);
169
165
  const url = `https://api.helloasso.com/v5/organizations/${encodeURIComponent(org)}/checkout-intents`;
170
166
  const resp = await fetchFn(url, {
171
167
  method: 'POST',
@@ -186,11 +182,7 @@ async function createHelloAssoCheckoutIntent(settings, bookingId, reservations)
186
182
 
187
183
  async function fetchHelloAssoCheckoutIntent(settings, checkoutIntentId) {
188
184
  const org = String(settings.ha_organizationSlug || '').trim();
189
- const token = const force = String(req.query.force || '') === '1';
190
- const clear = String(req.query.clear || '') === '1';
191
- // force=1 skips in-memory cache and refresh_token; clear=1 wipes stored refresh token
192
- haTokenCache = null;
193
- await getHelloAssoAccessToken(settings, { force, clearStored: clear });
185
+ const token = await getHelloAssoAccessToken(settings);
194
186
  const url = `https://api.helloasso.com/v5/organizations/${encodeURIComponent(org)}/checkout-intents/${encodeURIComponent(checkoutIntentId)}`;
195
187
  const resp = await fetchFn(url, { headers: { authorization: `Bearer ${token}`, accept: 'application/json' } });
196
188
  if (!resp.ok) {
@@ -230,11 +222,7 @@ async function fetchHelloAssoItems(settings) {
230
222
  } catch (e) {}
231
223
  }
232
224
 
233
- const token = const force = String(req.query.force || '') === '1';
234
- const clear = String(req.query.clear || '') === '1';
235
- // force=1 skips in-memory cache and refresh_token; clear=1 wipes stored refresh token
236
- haTokenCache = null;
237
- await getHelloAssoAccessToken(settings, { force, clearStored: clear });
225
+ const token = await getHelloAssoAccessToken(settings);
238
226
  const url = `https://api.helloasso.com/v5/organizations/${encodeURIComponent(org)}/forms/${encodeURIComponent(formType)}/${encodeURIComponent(formSlug)}/items`;
239
227
  const resp = await fetchFn(url, { headers: { authorization: `Bearer ${token}` } });
240
228
  if (!resp.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-equipment-calendar",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Equipment reservation calendar for NodeBB (FullCalendar, approvals, HelloAsso payments)",
5
5
  "main": "library.js",
6
6
  "scripts": {
package/plugin.json CHANGED
@@ -3,7 +3,6 @@
3
3
  "name": "Equipment Calendar",
4
4
  "description": "Calendar-based equipment reservations with group approvals and HelloAsso payments.",
5
5
  "url": "https://example.invalid",
6
- "library": "./library.js",
7
6
  "hooks": [
8
7
  {
9
8
  "hook": "static:app.load",
@@ -26,6 +25,6 @@
26
25
  "scripts": [
27
26
  "public/js/client.js"
28
27
  ],
29
- "version": "0.4.7",
28
+ "version": "0.4.8",
30
29
  "minver": "4.7.1"
31
30
  }