From 515e7d2719edded34ce4afc830c7086962289961 Mon Sep 17 00:00:00 2001 From: oiov Date: Mon, 26 May 2025 18:05:23 +0800 Subject: [PATCH] fixup error --- app/api/v1/scraping/markdown/route.ts | 2 +- app/api/v1/scraping/meta/route.ts | 2 +- app/api/v1/scraping/qrcode/route.ts | 2 +- app/api/v1/scraping/screenshot/route.ts | 2 +- app/api/v1/scraping/text/route.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/api/v1/scraping/markdown/route.ts b/app/api/v1/scraping/markdown/route.ts index b27ff64..cca39e3 100644 --- a/app/api/v1/scraping/markdown/route.ts +++ b/app/api/v1/scraping/markdown/route.ts @@ -73,7 +73,7 @@ export async function GET(req: Request) { const stats = await getIpInfo(req); await createScrapeMeta({ - ip: stats.ip, + ip: stats.ip || "::1", type: "markdown", referer: stats.referer, city: stats.city, diff --git a/app/api/v1/scraping/meta/route.ts b/app/api/v1/scraping/meta/route.ts index 92befbb..f9541f8 100644 --- a/app/api/v1/scraping/meta/route.ts +++ b/app/api/v1/scraping/meta/route.ts @@ -87,7 +87,7 @@ export async function GET(req: Request) { const stats = await getIpInfo(req); await createScrapeMeta({ - ip: stats.ip, + ip: stats.ip || "::1", type: "meta-info", referer: stats.referer, city: stats.city, diff --git a/app/api/v1/scraping/qrcode/route.ts b/app/api/v1/scraping/qrcode/route.ts index bc0684a..5ea9f93 100644 --- a/app/api/v1/scraping/qrcode/route.ts +++ b/app/api/v1/scraping/qrcode/route.ts @@ -44,7 +44,7 @@ export async function GET(req: Request) { const stats = await getIpInfo(req); await createScrapeMeta({ - ip: stats.ip, + ip: stats.ip || "::1", type: "qrcode", referer: stats.referer, city: stats.city, diff --git a/app/api/v1/scraping/screenshot/route.ts b/app/api/v1/scraping/screenshot/route.ts index d88dd01..527bbe2 100644 --- a/app/api/v1/scraping/screenshot/route.ts +++ b/app/api/v1/scraping/screenshot/route.ts @@ -72,7 +72,7 @@ export async function GET(req: Request) { const stats = await getIpInfo(req); await createScrapeMeta({ - ip: stats.ip, + ip: stats.ip || "::1", type: "screenshot", referer: stats.referer, city: stats.city, diff --git a/app/api/v1/scraping/text/route.ts b/app/api/v1/scraping/text/route.ts index ffff093..89fe9a9 100644 --- a/app/api/v1/scraping/text/route.ts +++ b/app/api/v1/scraping/text/route.ts @@ -66,7 +66,7 @@ export async function GET(req: Request) { const stats = await getIpInfo(req); await createScrapeMeta({ - ip: stats.ip, + ip: stats.ip || "::1", type: "text", referer: stats.referer, city: stats.city,