Add device diagnostics and P2P access controls
This commit is contained in:
@@ -105,6 +105,7 @@ export function registerIntakeRoutes(app, deps) {
|
||||
);
|
||||
if (!adm.ok) throw Object.assign(new Error('not admitted: ' + adm.reason), { status: 422 });
|
||||
await p2pDb.upsertHolder({ cid, deviceId: d.device_id, trust: 'challenged', now: now() });
|
||||
await p2pDb.recordDeviceTraffic?.(d.device_id, { up: got });
|
||||
let adopted = false;
|
||||
if (adopt) {
|
||||
try { adopted = !!(await adopt(tk.videoId, path, { sha256: cid, probe, meta: tk.meta })).adopted; keep = adopted; }
|
||||
|
||||
Reference in New Issue
Block a user