UBERF-4725 Migrate collaborative content (#5717)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2024-08-22 16:03:42 +05:00
committed by GitHub
parent 0e72b85978
commit df2a9b2708
97 changed files with 702 additions and 820 deletions
@@ -8,8 +8,9 @@
const token: string = getMetadata(presentation.metadata.Token) ?? ''
async function fetchCollabStats (tick: number): Promise<void> {
const collaborator = getMetadata(presentation.metadata.CollaboratorApiUrl)
await fetch(collaborator + `/api/v1/statistics?token=${token}`, {})
const collaboratorUrl = getMetadata(presentation.metadata.CollaboratorUrl) ?? ''
const collaboratorApiUrl = collaboratorUrl.replaceAll('wss://', 'https://').replace('ws://', 'http://')
await fetch(collaboratorApiUrl + `/api/v1/statistics?token=${token}`, {})
.then(async (json) => {
dataCollab = await json.json()
})