UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

12 lines 541 B
export const createGetLicensedUsers = (db) => async () => { const result = await db('users') .countDistinct('email_hash as activeCount') .whereNotNull('email_hash') .andWhere(function () { this.whereNull('deleted_at').orWhere('deleted_at', '>=', db.raw("NOW() - INTERVAL '30 days'")); }) .first(); return Number(result?.activeCount ?? 0); }; export const createFakeGetLicensedUsers = (licencedUsers = 0) => () => Promise.resolve(licencedUsers); //# sourceMappingURL=getLicensedUsers.js.map