Unlicensed should return false, not error

This commit is contained in:
Alex van Andel
2022-10-12 02:40:52 +01:00
parent 6cc8fcae52
commit e772b4203e
@@ -20,6 +20,7 @@ const schemaLicenseKey = z
async function checkLicense(license: string): Promise<boolean> {
if (!!process.env.NEXT_PUBLIC_IS_E2E) return true;
if (!license) return false;
const url = `${CONSOLE_URL}/api/license?key=${schemaLicenseKey.parse(license)}`;
const cachedResponse = cache.get(url);
if (cachedResponse) {