From e631da2ddf0f6eba529c0e2bda38c046ff2fa5b0 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Sun, 1 Jun 2025 11:01:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F=20Check=20license=20statu?= =?UTF-8?q?s=20in=20validation=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/app/api/licensing/v1/[...route]/route.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web/src/app/api/licensing/v1/[...route]/route.ts b/apps/web/src/app/api/licensing/v1/[...route]/route.ts index ac47d883f..da802ae30 100644 --- a/apps/web/src/app/api/licensing/v1/[...route]/route.ts +++ b/apps/web/src/app/api/licensing/v1/[...route]/route.ts @@ -111,6 +111,10 @@ app.post( return c.json({ error: "License not found" }, 404); } + if (license.status !== "ACTIVE") { + return c.json({ error: "License is not active" }, 400); + } + await prisma.licenseValidation.create({ data: { licenseId: license.id,