Skip to content

Commit 98fcda6

Browse files
committed
fix: invalid app export
1 parent 8bda52d commit 98fcda6

File tree

12 files changed

+152
-4844
lines changed

12 files changed

+152
-4844
lines changed

app/apii/[day]/[token]/route.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { NextRequest } from 'next/server'
2+
import { AppConfig } from '../../../../lib/AppConfig'
3+
4+
type ResponseData = {
5+
description: string
6+
external_url: string
7+
image: string
8+
name: string
9+
attributes: any[]
10+
}
11+
12+
export async function GET(
13+
request: NextRequest,
14+
{ params }: { params: Promise<{ day: string; token: string }> }
15+
): Promise<Response> {
16+
const { day, token } = await params
17+
18+
const data: ResponseData = {
19+
"description": AppConfig.description,
20+
"external_url": AppConfig.siteUrl,
21+
"image": `${AppConfig.siteUrl}/images/nft/${day}.png`,
22+
"name": `Unlock Protocol Advent Calendar - Day ${day} - Token ${token}`,
23+
"attributes": []
24+
}
25+
26+
return Response.json(data)
27+
}
28+

0 commit comments

Comments
 (0)