force-dynamic

This commit is contained in:
我若为王 2024-12-05 15:02:53 +08:00
parent c42da8e240
commit 2caf2bf819
3 changed files with 4 additions and 7 deletions

View File

@ -2,7 +2,7 @@
import { decrypt, getParams } from '../../utils/decode';
export const runtime = 'edge'
export const dynamic = "force-dynamic"
export async function GET(request, { params }) {
try {
const { sid } = params;
@ -21,7 +21,6 @@ export async function GET(request, { params }) {
const tokenResponse = await fetch('http://api.extscreen.com/aliyundrive/v3/token', {
method: 'POST',
headers: headers,
next: { revalidate: 0 }, // Disable cache
body: JSON.stringify(sendData)
});

View File

@ -1,12 +1,11 @@
export const runtime = 'edge'
export const dynamic = "force-dynamic"
export async function POST() {
try {
const response = await fetch('http://api.extscreen.com/aliyundrive/qrcode', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
next: { revalidate: 0 }, // Disable cache
body: JSON.stringify({
scopes: ["user:base", "file:all:read", "file:all:write"].join(','),
width: 500,

View File

@ -2,7 +2,7 @@
import { decrypt, getParams } from '../utils/decode';
export const runtime = 'edge'
export const dynamic = "force-dynamic"
export async function POST(request) {
try {
const { refresh_token } = await request.json();
@ -19,7 +19,6 @@ export async function POST(request) {
const response = await fetch('http://api.extscreen.com/aliyundrive/v3/token', {
method: 'POST',
next: { revalidate: 0 }, // Disable cache
headers: headers,
body: JSON.stringify(sendData)
});