refactor!: remove firebase leftovers, admin page on the server (P1-8)

BREAKING CHANGE: admin/cleanup.js, admin/setcoins.js and docs/firebase are gone; the admin page now runs at /admin/.
This commit is contained in:
Benjamin Oezcan
2026-11-19 02:11:13 +01:00
parent 0202a08b8d
commit b587d12f37
14 changed files with 135 additions and 450 deletions

View File

@@ -71,3 +71,12 @@ test('campaign cloud save round trip', async () => {
const r = await S.json('GET', '/api/campaign', undefined, a.idToken);
assert.deepEqual(r.body, { money: 5, ts: 1 });
});
test('admin event presets: admin only; admin page is served', async () => {
const a = await S.account();
assert.equal((await S.json('GET', '/api/admin/events', undefined, a.idToken)).status, 403);
assert.equal((await S.json('POST', '/api/admin/events', { name: 'x' }, a.idToken)).status, 403);
const page = await fetch(S.base + '/admin/');
assert.equal(page.status, 200);
assert.match(await page.text(), /Robot Clash – Admin/);
});