fix(capture): add auth header to finalize call in POST /capture/stop
This commit is contained in:
parent
a22bda44a7
commit
7631527f46
1 changed files with 4 additions and 1 deletions
|
|
@ -484,7 +484,10 @@ router.post('/stop', async (req, res) => {
|
||||||
|
|
||||||
const mamResponse = await fetch(`${MAM_API_URL}/api/v1/assets/${completedSession.assetId}/${path}`, {
|
const mamResponse = await fetch(`${MAM_API_URL}/api/v1/assets/${completedSession.assetId}/${path}`, {
|
||||||
method: 'POST',
|
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),
|
body: JSON.stringify(body),
|
||||||
});
|
});
|
||||||
if (!mamResponse.ok) {
|
if (!mamResponse.ok) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue