Owner account (ADMIN_EMAIL) has no link or source cap (Marty 2026-11-17: 'since I am the owner, I don't want a limit on my account'); members keep 100 links / 30 sources
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ async function list(owner) {
|
||||
inUse: Array.from(new Set(items.map(s => s.template).filter(k => k && k !== 'custom'))), keys: KEYS, events: postbacks.EVENTS, limits: LIMITS };
|
||||
}
|
||||
async function create(owner, body) {
|
||||
if (mine(owner).length >= LIMITS.perAccount) return { error: 'Up to ' + LIMITS.perAccount + ' sources per account.' };
|
||||
if (String(owner || '').trim().toLowerCase() !== String(process.env.ADMIN_EMAIL || '').trim().toLowerCase() && mine(owner).length >= LIMITS.perAccount) return { error: 'Up to ' + LIMITS.perAccount + ' sources per account.' }; // the owner's account has no source cap (Marty 2026-11-17)
|
||||
const tplKey = String(body.template || 'custom').trim().toLowerCase(); const tpl = tplKey !== 'custom' ? template(tplKey) : null;
|
||||
if (tplKey !== 'custom' && !tpl) return { error: 'No such network template.' };
|
||||
const name = String(body.name || (tpl ? tpl.name : '')).trim().slice(0, LIMITS.name); if (!name) return { error: 'Give the source a name.' };
|
||||
|
||||
Reference in New Issue
Block a user