23 lines
543 B
JavaScript
23 lines
543 B
JavaScript
const { pool } = require("./src/db/pool");
|
|
|
|
(async () => {
|
|
try {
|
|
const { rows } = await pool.query(
|
|
`SELECT o.id AS org_id, t.id AS team_id
|
|
FROM orgs o
|
|
JOIN teams t ON t.org_id = o.id
|
|
WHERE o.name = 'Default Organization'
|
|
AND t.name = 'Default Team'
|
|
LIMIT 1`
|
|
);
|
|
if (rows[0]) {
|
|
console.log("[bootstrap-scope]", JSON.stringify(rows[0]));
|
|
}
|
|
} finally {
|
|
await pool.end();
|
|
}
|
|
})().catch((error) => {
|
|
console.error("[bootstrap-scope-error]", error);
|
|
process.exit(1);
|
|
});
|