Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🔒️ Check license status in validation response

Luke Vellae631da2ddf0f
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,