fix(capture): add auth header to finalize call in POST /capture/stop

This commit is contained in:
Wild Dragon Dev 2026-06-03 22:11:15 +00:00
parent a22bda44a7
commit 7631527f46

View file

@ -484,7 +484,10 @@ router.post('/stop', async (req, res) => {
const mamResponse = await fetch(`${MAM_API_URL}/api/v1/assets/${completedSession.assetId}/${path}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
headers: {
'Content-Type': 'application/json',
...(MAM_API_TOKEN ? { Authorization: `Bearer ${MAM_API_TOKEN}` } : { 'X-Requested-With': 'dragonflight-ui' }),
},
body: JSON.stringify(body),
});
if (!mamResponse.ok) {