feat: implement find_all method in ChannelRepository and update related services and routes for public access
This commit is contained in:
@@ -27,14 +27,12 @@ export async function GET(
|
||||
const { channelId } = await params;
|
||||
const token = request.nextUrl.searchParams.get("token");
|
||||
|
||||
if (!token) {
|
||||
return new Response(null, { status: 401 });
|
||||
}
|
||||
|
||||
let res: Response;
|
||||
try {
|
||||
const headers: Record<string, string> = {};
|
||||
if (token) headers["Authorization"] = `Bearer ${token}`;
|
||||
res = await fetch(`${API_URL}/channels/${channelId}/stream`, {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
headers,
|
||||
redirect: "manual",
|
||||
});
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user