Updated list of commands to v4.3. Added groups & permissions. Added connections. Updated redemptions and actions to v4.3.
This commit is contained in:
@ -18,16 +18,21 @@ export async function GET(req: Request) {
|
||||
if (!auth)
|
||||
return new NextResponse("Bad Request", { status: 400 })
|
||||
|
||||
const redemptions = await axios.get("https://api.twitch.tv/helix/channel_points/custom_rewards?broadcaster_id=" + auth.broadcaster_id,
|
||||
{
|
||||
headers: {
|
||||
"Client-Id": process.env.TWITCH_BOT_CLIENT_ID,
|
||||
"Authorization": "Bearer " + auth.access_token
|
||||
try {
|
||||
const redemptions = await axios.get("https://api.twitch.tv/helix/channel_points/custom_rewards?broadcaster_id=" + auth.broadcaster_id,
|
||||
{
|
||||
headers: {
|
||||
"Client-Id": process.env.TWITCH_BOT_CLIENT_ID,
|
||||
"Authorization": "Bearer " + auth.access_token
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
return NextResponse.json(redemptions.data);
|
||||
return NextResponse.json(redemptions.data);
|
||||
} catch (error: any) {
|
||||
console.error('Fetching Twitch channel redemptions:', error.response.data)
|
||||
}
|
||||
return NextResponse.json([]);
|
||||
} catch (error) {
|
||||
console.log("[REDEMPTIONS/ACTIONS]", error);
|
||||
return new NextResponse("Internal Error", { status: 500 });
|
||||
|
Reference in New Issue
Block a user