fix(routes+ui): capture route bin optional, jobs Redis URL, recorders S3_REGION+stop codes, api.js full rewrite, upload.html multipart fix, capture.html bin guard: capture.js

This commit is contained in:
Zac Gaetano 2026-05-16 00:30:25 -04:00
parent 0bdfbaf130
commit f9c680cc22

View file

@ -64,21 +64,21 @@ router.get('/status', (req, res) => {
/**
* POST /start
* Start a new capture session
* Body: { project_id, bin_id, clip_name, device }
* Body: { project_id, clip_name, device, bin_id? }
*/
router.post('/start', async (req, res) => {
try {
const { project_id, bin_id, clip_name, device } = req.body;
if (!project_id || !bin_id || !clip_name || device === undefined) {
if (!project_id || !clip_name || device === undefined) {
return res.status(400).json({
error: 'Missing required fields: project_id, bin_id, clip_name, device',
error: 'Missing required fields: project_id, clip_name, device',
});
}
const session = await captureManager.start({
projectId: project_id,
binId: bin_id,
binId: bin_id || null,
clipName: clip_name,
device,
});