Unlicensed should return false, not error
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) {
|
||||
|
|
Loading…
Reference in New Issue