fix: assert ads.txt

This commit is contained in:
TrèsAbhi committed 2024-10-11 10:49:29 -05:00
1 parent 8e26413628
commit 7af06d2120
2 files changed
+5 -1

No files matched your search

+1
View File
@@ -108,6 +108,7 @@
"NEGATIVEX", "NEGATIVEX",
"NEGATIVEY", "NEGATIVEY",
"NEGATIVEZ", "NEGATIVEZ",
"NITROPAY",
"nivo", "nivo",
"nmatname", "nmatname",
"noout", "noout",
+4 -1
View File
@@ -1,10 +1,13 @@
import { assertSecret } from '@blitzkit/core';
import type { APIContext } from 'astro'; import type { APIContext } from 'astro';
export const prerender = false; export const prerender = false;
export async function GET({}: APIContext) { export async function GET({}: APIContext) {
const response = await fetch( const response = await fetch(
`https://api.nitropay.com/v1/ads-${import.meta.env.PUBLIC_NITROPAY_ID}.txt`, `https://api.nitropay.com/v1/ads-${assertSecret(
import.meta.env.PUBLIC_NITROPAY_ID,
)}.txt`,
); );
const text = await response.text(); const text = await response.text();
const date = new Date(); const date = new Date();