feat(action): direct accept/reject buttons — no mirror tab needed, Extension /api/action endpoint
This commit is contained in:
@@ -330,7 +330,15 @@ app.get('/api/bridge/trajectory/:id', async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
// Bridge WS 이벤트 → 프론트엔드 포워딩
|
||||
app.post('/api/bridge/action', async (req, res) => {
|
||||
try {
|
||||
const { action } = req.body;
|
||||
const result = await bridge.sendAction(action);
|
||||
res.json(result);
|
||||
} catch (e) {
|
||||
res.status(502).json({ error: e.message });
|
||||
}
|
||||
});
|
||||
bridge.connectWs((msg) => {
|
||||
broadcastToAll({ type: 'bridge_event', ...msg });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user