From ee5ea7e0bcf5d7243df0bf4f50add172fff3ffea Mon Sep 17 00:00:00 2001 From: JimmyLv Date: Fri, 3 Mar 2023 18:38:44 +0800 Subject: [PATCH] fix: field is not correct --- middleware.ts | 2 +- utils/3rd/lemon.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/middleware.ts b/middleware.ts index b2551010..b9fd8367 100644 --- a/middleware.ts +++ b/middleware.ts @@ -28,7 +28,7 @@ export async function middleware(req: NextRequest, context: NextFetchEvent) { } } // TODO: unique to a user (userid, email etc) instead of IP - const identifier = req.ip ?? "127.0.0.6"; + const identifier = req.ip ?? "127.0.0.7"; const { success, remaining } = await ratelimit.limit(identifier); console.log(`======== ip ${identifier}, remaining: ${remaining} ========`); if (!apiKey && !success) { diff --git a/utils/3rd/lemon.ts b/utils/3rd/lemon.ts index f9198384..7c754ab9 100644 --- a/utils/3rd/lemon.ts +++ b/utils/3rd/lemon.ts @@ -15,5 +15,5 @@ export async function activeLicenseKey(licenseKey: string, bvId?: string) { } ); const result = await response.json(); - return result.actived; + return result.activated; }