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 +3 -15
- package/package.json +1 -1
- package/plugin.json +1 -2
package/library.js
CHANGED
|
@@ -161,11 +161,7 @@ async function createHelloAssoCheckoutIntent(settings, bookingId, reservations)
|
|
|
161
161
|
},
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
-
const token =
|
|
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 =
|
|
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 =
|
|
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
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.
|
|
28
|
+
"version": "0.4.8",
|
|
30
29
|
"minver": "4.7.1"
|
|
31
30
|
}
|