Changed settings layout + separated settings into different pages. Cleaned some code. Working on tts pages (no db/rest calls yet).
This commit is contained in:
@ -12,7 +12,6 @@ export async function GET(req: Request) {
|
||||
}
|
||||
})
|
||||
|
||||
console.log("API USER:", key)
|
||||
if (!key) {
|
||||
return new NextResponse("Forbidden", { status: 403 });
|
||||
}
|
||||
@ -35,7 +34,6 @@ export async function GET(req: Request) {
|
||||
if (expires_in > 3600)
|
||||
return new NextResponse("", { status: 201 });
|
||||
} catch (error) {
|
||||
console.log("Oudated Twitch token.")
|
||||
}
|
||||
|
||||
// Post to https://id.twitch.tv/oauth2/token
|
||||
@ -48,9 +46,9 @@ export async function GET(req: Request) {
|
||||
|
||||
// Fetch values from token.
|
||||
const { access_token, expires_in, refresh_token, token_type } = token
|
||||
console.log("AT", access_token)
|
||||
console.log("RT", refresh_token)
|
||||
console.log("TT", token_type)
|
||||
// console.log("AT", access_token)
|
||||
// console.log("RT", refresh_token)
|
||||
// console.log("TT", token_type)
|
||||
|
||||
if (!access_token || !refresh_token || token_type !== "bearer") {
|
||||
return new NextResponse("Unauthorized", { status: 401 });
|
||||
|
Reference in New Issue
Block a user