@cocalc/server
Version:
CoCalc server functionality: functions used by either the hub and the next.js server
13 lines • 585 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 getTitle(project_id) {
const pool = (0, pool_1.default)("long");
const { rows } = await pool.query("SELECT title FROM projects WHERE project_id=$1", [project_id]);
return rows[0]?.title ?? "Untitled Project";
}
exports.default = getTitle;
//# sourceMappingURL=get-title.js.map