// 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; };