feat: implement find_all method in ChannelRepository and update related services and routes for public access

This commit is contained in:
2026-03-11 21:29:33 +01:00
parent d7b21120c8
commit 8cc3439d2e
7 changed files with 44 additions and 27 deletions

View File

@@ -106,7 +106,8 @@ export function useStreamUrl(
return useQuery({
queryKey: ["stream-url", channelId, slotId],
queryFn: async (): Promise<string | null> => {
const params = new URLSearchParams({ token: token! });
const params = new URLSearchParams();
if (token) params.set("token", token);
const res = await fetch(`/api/stream/${channelId}?${params}`, {
cache: "no-store",
});
@@ -115,7 +116,7 @@ export function useStreamUrl(
const { url } = await res.json();
return url as string;
},
enabled: !!channelId && !!token && !!slotId,
enabled: !!channelId && !!slotId,
staleTime: Infinity,
retry: false,
});