mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-30 12:15:51 +00:00
qfix: provide token when fetching video meta (#7890)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
87586fb195
commit
93effa442d
@ -133,13 +133,14 @@ export async function getVideoMeta (file: string, filename?: string): Promise<Vi
|
||||
return undefined
|
||||
}
|
||||
|
||||
const token = getMetadata(presentation.metadata.Token) ?? ''
|
||||
const frontUrl = getMetadata(presentation.metadata.FrontUrl) ?? window.location.origin
|
||||
if (!url.includes('://')) {
|
||||
url = concatLink(frontUrl ?? '', url)
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(url)
|
||||
const response = await fetch(url, { headers: { Authorization: `Bearer ${token}` } })
|
||||
if (response.ok) {
|
||||
return (await response.json()) as VideoMeta
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user