Improving UI and sync process
Some checks failed
Tests et déploiement / validate (push) Failing after 4m57s
Tests et déploiement / deploy (push) Has been skipped

This commit is contained in:
2026-10-10 16:51:43 +02:00
parent 5686ee5072
commit d651166c6a
9 changed files with 363 additions and 101 deletions

View File

@@ -196,7 +196,7 @@ export function createSyncServer({ filename = ':memory:', origin = '', maxBytes
if (req.method === 'DELETE') { run('DELETE FROM invitations WHERE code=?', invite.code); return { ok: true }; }
if (match[2] === 'heartbeat' && req.method === 'POST') {
if (!invite.approved) run('UPDATE invitations SET lease=? WHERE code=?', now() + 25000, invite.code);
return { applicant: invite.applicant ? parse(invite.applicant) : null, approved: !!invite.approved };
return { applicant: invite.applicant ? parse(invite.applicant) : null, approved: !!invite.approved, expires: invite.expires };
}
if (match[2] === 'approve' && req.method === 'POST') {
if (invite.approved) return { ok: true };