UNPKG

@cocalc/server

Version:

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

15 lines 730 B
"use strict"; // Get email address of an account. If no such account or email not set, returns undefined... // Answers are cached for a while. 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 getEmailAddress(account_id) { const pool = (0, pool_1.default)("long"); const { rows } = await pool.query("SELECT email_address FROM accounts WHERE account_id=$1", [account_id]); return rows[0]?.email_address; } exports.default = getEmailAddress; //# sourceMappingURL=get-email-address.js.map