v.1.0.0. initial push of license-lib

This commit is contained in:
2025-03-19 09:37:30 -05:00
commit b22a1c973c
20 changed files with 433 additions and 0 deletions

14
client/validate.js Normal file
View File

@@ -0,0 +1,14 @@
// client/validate.js
import { CONFIG } from './config';
export const activateLicense = async (userId, licenseKey) => {
const response = await fetch(`${CONFIG.LICENSE_API_URL}/validate-license`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ userId, licenseKey }),
});
const { valid } = await response.json();
return valid;
};