We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 825929f commit 6a083b2Copy full SHA for 6a083b2
app/api/artifact/route.ts
@@ -12,12 +12,16 @@ async function handle(req: NextRequest, res: NextResponse) {
12
if (req.method === "POST") {
13
const clonedBody = await req.text();
14
const hashedCode = md5.hash(clonedBody).trim();
15
- const body = {
+ const body: {
16
+ key: string;
17
+ value: string;
18
+ expiration_ttl?: Number;
19
+ } = {
20
key: hashedCode,
21
value: clonedBody,
22
};
23
try {
- const ttl = parseInt(serverConfig.cloudflareKVTTL);
24
+ const ttl = parseInt(serverConfig.cloudflareKVTTL as string);
25
if (ttl > 60) {
26
body["expiration_ttl"] = ttl;
27
}
0 commit comments