apiblaze 0.21.32 → 0.21.33
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/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__
|
|
|
34
34
|
var version;
|
|
35
35
|
var init_package = __esm({
|
|
36
36
|
"package.json"() {
|
|
37
|
-
version = "0.21.
|
|
37
|
+
version = "0.21.33";
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
|
|
@@ -6631,6 +6631,13 @@ async function refresh() {
|
|
|
6631
6631
|
const r = await act('list');
|
|
6632
6632
|
const rows = Array.isArray(r.body) ? r.body : [];
|
|
6633
6633
|
if (me() === 'ana') anaBooking[state.pizzeria] = rows.length ? rows[0].id : null;
|
|
6634
|
+
// Signed in as Ben, the page has just reloaded (every switch does), so it asks for Ana's
|
|
6635
|
+
// latest booking to offer the "Can Ben cancel it?" check.
|
|
6636
|
+
if (me() === 'ben') {
|
|
6637
|
+
const a = await act('list', { as: 'ana' });
|
|
6638
|
+
const anaRows = Array.isArray(a.body) ? a.body : [];
|
|
6639
|
+
anaBooking[state.pizzeria] = anaRows.length ? anaRows[0].id : null;
|
|
6640
|
+
}
|
|
6634
6641
|
const ul = $('#list'); ul.replaceChildren();
|
|
6635
6642
|
if (r.status === 402) { const li = document.createElement('li'); li.className = 'empty'; li.textContent = 'This demo has used its free requests. For a fresh one, run: npx apiblaze@latest demo'; ul.append(li); }
|
|
6636
6643
|
else if (r.status && r.status !== 200) { const li = document.createElement('li'); li.className = 'empty'; li.textContent = 'Could not load reservations (HTTP ' + r.status + ').'; ul.append(li); }
|