UNPKG

@cocalc/server

Version:

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

20 lines 791 B
"use strict"; /* Returns the configured help email address. Cached with "long" TTL so doesn't put load on database even if called frequently. */ 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 getHelpEmail() { const pool = (0, pool_1.default)("long"); const { rows } = await pool.query("SELECT value FROM server_settings WHERE name='help_email'"); if (rows.length == 0 || !rows[0].value) { throw Error("no help email address set"); } return rows[0].value; } exports.default = getHelpEmail; //# sourceMappingURL=help.js.map