UNPKG

@cocalc/server

Version:

CoCalc server functionality: functions used by either the hub and the next.js server

13 lines 618 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const pool_1 = __importDefault(require("@cocalc/database/pool")); async function getRequiresTokens() { const pool = (0, pool_1.default)("long"); const { rows } = await pool.query("SELECT EXISTS(SELECT 1 FROM registration_tokens WHERE disabled IS NOT true) AS have_tokens"); return !!rows[0]?.have_tokens; } exports.default = getRequiresTokens; //# sourceMappingURL=get-requires-token.js.map