@cocalc/server
Version:
CoCalc server functionality: functions used by either the hub and the next.js server
13 lines • 612 B
JavaScript
;
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 isAccountAvailable(email_address) {
const pool = (0, pool_1.default)("medium");
const { rows } = await pool.query("SELECT account_id FROM accounts WHERE email_address=$1", [email_address]);
return rows.length == 0;
}
exports.default = isAccountAvailable;
//# sourceMappingURL=is-account-available.js.map