INNER CODE UNIT · JavaScript
decide
bostrot/wsl2-distro-manager · n8n/licensing/seat_check.js:138
function decide(input) {
const row = input.row || {};
const query = input.query || {};
const headers = input.headers || {};
const now = input.now || new Date();
const nowIso = now.toISOString();
if (!row.license_key) {
return invalid('unknown_key', 'No licence with this key.');
}
if (!isActive(row)) {
return invalid('inactive', 'This licence has been deactivated.');
}
if (isExpired(row, now)) {
return invalid('expired', 'This licence has expired.');
}
const seats = seatCount(row);