File size: 584 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { NextResponse } from 'next/server'

export const revalidate = 0

export async function GET() {
  const data360 = await fetch(
    'https://next-data-api-endpoint.vercel.app/api/random',
    {
      next: {
        revalidate: 360,
        tags: ['thankyounext'],
      },
    }
  ).then((res) => res.text())

  const data10 = await fetch(
    'https://next-data-api-endpoint.vercel.app/api/random?a=10',
    {
      next: {
        revalidate: 10,
        tags: ['thankyounext'],
      },
    }
  ).then((res) => res.text())

  return NextResponse.json({ data360, data10 })
}