diff --git a/bannerspin.js b/bannerspin.js index 0968378..cbfe381 100644 --- a/bannerspin.js +++ b/bannerspin.js @@ -199,8 +199,9 @@ function pub(s, extra) { } async function list(owner) { return mine(owner).map(s => pub(s)); } async function create(owner, body) { + // the owner (ADMIN_EMAIL) has no Banner Spin count cap (Marty 2026-11-09, same as the upload exemption); members keep their tier's count const t = await tierFor(owner); if (!t.ok) return { error: t.reason, tier: t }; - if (mine(owner).length >= t.spins) return { error: 'Your ' + t.label + ' tier holds ' + t.spins + ' Banner Spins.' + (t.next ? ' ' + t.next.label + ' (' + t.next.need + ') holds ' + t.next.spins + '.' : ''), tier: t }; + if (!(ADMIN && norm(owner) === ADMIN) && mine(owner).length >= t.spins) return { error: 'Your ' + t.label + ' tier holds ' + t.spins + ' Banner Spins.' + (t.next ? ' ' + t.next.label + ' (' + t.next.need + ') holds ' + t.next.spins + '.' : ''), tier: t }; const name = String(body.name || '').trim().slice(0, 80); if (!name) return { error: 'Give the Banner Spin a name.' }; const size = String(body.size || ''); if (!SIZES[size]) return { error: 'Pick one of the sizes: ' + Object.keys(SIZES).join(', ') + '.' }; const s = { id: J.db.spins.reduce((m, x) => Math.max(m, x.id), 0) + 1, owner: norm(owner), name, code: newCode(), size, mode: body.mode === 'visitor' ? 'visitor' : 'weight', fallback: httpsUrl(body.fallback) || '', fallbackImage: '', banners: [], nextBanner: 1, paused: false, created: Date.now() };