Verify packet PTT readiness and isolate manual VHF forwarding status

This commit is contained in:
alberto committed 2026-10-17 00:54:46 +02:00
1 parent 9bb62cf731
commit abfc8be078
7 files changed
+16 -7

No files matched your search

+1 -1
View File
@@ -143,7 +143,7 @@ const server=http.createServer(async(req,res)=>{
if(url.pathname==='/api/logout'&&req.method==='POST'){const token=req.headers.cookie.match(/alnode=([a-f0-9]+)/)?.[1];user.terminal?.close();sessions.delete(token);res.setHeader('Set-Cookie','alnode=; HttpOnly; SameSite=Strict; Path=/; Max-Age=0');json(res,200,{ok:true});return;}
if(url.pathname==='/api/journal'&&req.method==='GET'){json(res,200,await journal.snapshot());return;}
if(url.pathname==='/api/stations/location'&&req.method==='POST'){const data=await body(req);json(res,200,await journal.saveLocation(String(data.call||''),String(data.locator||'')));return;}
if(url.pathname==='/api/forwarding'&&req.method==='GET'){const data=await forwarding.snapshot();json(res,200,{...data,manualSession:manualForwarding.snapshot(),profiles:[...data.profiles,...manualForwarding.profiles(data.profiles)]});return;}
if(url.pathname==='/api/forwarding'&&req.method==='GET'){const data=await forwarding.snapshot();json(res,200,{...data,manualSession:manualForwarding.snapshot(),profiles:manualForwarding.displayProfiles(data.profiles)});return;}
if(url.pathname==='/api/forwarding/manual/restore'&&req.method==='POST'){json(res,200,await manualForwarding.restore());return;}
const fwdStart=url.pathname.match(/^\/api\/forwarding\/([A-Z0-9-]{1,32})\/sync$/);if(fwdStart&&req.method==='POST'){const peer=fwdStart[1];json(res,200,manualForwarding.routes.some(r=>r.id===peer)?await manualForwarding.startRoute(peer):await forwarding.start(peer));return;}
if(url.pathname==='/api/dashboard'){json(res,200,await dashboard());return;}