mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 04:36:12 +01:00
feat: disable tools on opentest
This commit is contained in:
1 parent
48dcbbc227
commit
b9c978548a
20 files changed
+107
-99
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import { assertSecrete } from '../../../../../core/blitzkit/secrete';
|
||||
import { assertSecret } from '../../../../../core/blitzkit/secret';
|
||||
|
||||
export async function GET(
|
||||
request: Request,
|
||||
@@ -8,11 +8,11 @@ export async function GET(
|
||||
const response = await fetch(
|
||||
`https://www.patreon.com/api/oauth2/token?code=${
|
||||
params.code
|
||||
}&grant_type=authorization_code&client_id=${assertSecrete(
|
||||
}&grant_type=authorization_code&client_id=${assertSecret(
|
||||
process.env.NEXT_PUBLIC_PATREON_CLIENT_ID,
|
||||
)}&client_secret=${assertSecrete(
|
||||
)}&client_secret=${assertSecret(
|
||||
process.env.PATREON_CLIENT_SECRET,
|
||||
)}&redirect_uri=${assertSecrete(process.env.NEXT_PUBLIC_PATREON_REDIRECT_URI)}`,
|
||||
)}&redirect_uri=${assertSecret(process.env.NEXT_PUBLIC_PATREON_REDIRECT_URI)}`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import { assertSecrete } from '../../../../../core/blitzkit/secrete';
|
||||
import { assertSecret } from '../../../../../core/blitzkit/secret';
|
||||
|
||||
interface PatreonMembershipResponse {
|
||||
data: {
|
||||
@@ -69,7 +69,7 @@ export async function GET(
|
||||
(item) =>
|
||||
item.type === 'member' &&
|
||||
item.relationships.campaign.data.id ===
|
||||
assertSecrete(process.env.PATREON_CAMPAIGN_ID) &&
|
||||
assertSecret(process.env.PATREON_CAMPAIGN_ID) &&
|
||||
item.attributes.patron_status === 'active_patron',
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import { assertSecrete } from '../../../../../core/blitzkit/secrete';
|
||||
import { assertSecret } from '../../../../../core/blitzkit/secret';
|
||||
|
||||
export async function GET(
|
||||
request: Request,
|
||||
@@ -8,9 +8,9 @@ export async function GET(
|
||||
const response = await fetch(
|
||||
`https://www.patreon.com/api/oauth2/token?grant_type=refresh_token&refresh_token=${
|
||||
params.token
|
||||
}&client_id=${assertSecrete(
|
||||
}&client_id=${assertSecret(
|
||||
process.env.NEXT_PUBLIC_PATREON_CLIENT_ID,
|
||||
)}&client_secret=${assertSecrete(process.env.PATREON_CLIENT_SECRET)}`,
|
||||
)}&client_secret=${assertSecret(process.env.PATREON_CLIENT_SECRET)}`,
|
||||
{ method: 'POST' },
|
||||
);
|
||||
const json = await response.json();
|
||||
|
||||
Reference in new issue
Block a user