2026-03-09 19:33:28 +01:00
|
|
|
import { getRecording } from "$lib/services";
|
|
|
|
|
import type { Recording } from "$lib/types";
|
|
|
|
|
|
2026-03-11 09:01:47 +01:00
|
|
|
export async function load({ url, fetch, cookies }) {
|
2026-03-09 19:33:28 +01:00
|
|
|
const recordingId = url.searchParams.get("recording");
|
2026-03-11 09:01:47 +01:00
|
|
|
const token = cookies.get("session_token") || "";
|
2026-03-09 19:33:28 +01:00
|
|
|
|
|
|
|
|
let recording: Recording | null = null;
|
|
|
|
|
if (recordingId) {
|
2026-03-11 09:01:47 +01:00
|
|
|
recording = await getRecording(recordingId, fetch, token).catch(() => null);
|
2026-03-09 19:33:28 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-11 09:01:47 +01:00
|
|
|
return { recording };
|
2026-03-09 19:33:28 +01:00
|
|
|
}
|