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:
parent
0bdfbaf130
commit
f9c680cc22
1 changed files with 4 additions and 4 deletions
|
|
@ -64,21 +64,21 @@ router.get('/status', (req, res) => {
|
||||||
/**
|
/**
|
||||||
* POST /start
|
* POST /start
|
||||||
* Start a new capture session
|
* 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) => {
|
router.post('/start', async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const { project_id, bin_id, clip_name, device } = req.body;
|
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({
|
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({
|
const session = await captureManager.start({
|
||||||
projectId: project_id,
|
projectId: project_id,
|
||||||
binId: bin_id,
|
binId: bin_id || null,
|
||||||
clipName: clip_name,
|
clipName: clip_name,
|
||||||
device,
|
device,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue