"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"));
const misc_1 = require("@cocalc/util/misc");
async function getProxyProjectId() {
    const pool = (0, pool_1.default)("long");
    const { rows } = await pool.query("SELECT value FROM server_settings WHERE name='github_project_id'");
    if (rows.length == 0 || !(0, misc_1.isValidUUID)(rows[0].value)) {
        throw Error("github_project_id is not configured");
    }
    return rows[0].value;
}
exports.default = getProxyProjectId;
//# sourceMappingURL=project.js.map