diff --git a/src/lib/components/Channel/Chat/DrawerRestream.svelte b/src/lib/components/Channel/Chat/DrawerRestream.svelte index 6b41e8f0..7c9ac054 100644 --- a/src/lib/components/Channel/Chat/DrawerRestream.svelte +++ b/src/lib/components/Channel/Chat/DrawerRestream.svelte @@ -37,16 +37,18 @@ const remove = async () => { loading = true - await del(`/output?outputId=${selected}`, auth) + await del(`output?outputId=${selected}`, auth) await getAll() loading = false confirm_modal = false } const getAll = async () => { - loading = true - urlList = await get('outputs', auth) - loading = false + if ($page.data.user?.userId) { + loading = true + urlList = await get('outputs', auth) + loading = false + } } const confirm = (id: string) => { @@ -66,16 +68,11 @@ onMount(() => { getAll() }) - - $: cloudFareUrl = payload.url.includes('cloudflare') - $: invalidUrl = !isValidURL(payload.url) - $: disbaled = loading || - !payload.url || - !payload.streamKey || - invalidUrl || - cloudFareUrl + $: cloudflareUrl = payload.url.includes('cloudflare') + $: invalidUrl = !isValidURL(payload.url) + $: disbaled = loading || !payload.url || !payload.streamKey || invalidUrl || cloudflareUrl