Improving UI and sync process
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user