Skip to content

Commit 6a083b2

Browse files
committed
fix typescript error
1 parent 825929f commit 6a083b2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/api/artifact/route.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ async function handle(req: NextRequest, res: NextResponse) {
1212
if (req.method === "POST") {
1313
const clonedBody = await req.text();
1414
const hashedCode = md5.hash(clonedBody).trim();
15-
const body = {
15+
const body: {
16+
key: string;
17+
value: string;
18+
expiration_ttl?: Number;
19+
} = {
1620
key: hashedCode,
1721
value: clonedBody,
1822
};
1923
try {
20-
const ttl = parseInt(serverConfig.cloudflareKVTTL);
24+
const ttl = parseInt(serverConfig.cloudflareKVTTL as string);
2125
if (ttl > 60) {
2226
body["expiration_ttl"] = ttl;
2327
}

0 commit comments

Comments
 (0)