feat: implement find_all method in ChannelRepository and update related services and routes for public access
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user