gristlabs_grist-core/app/server/lib/gristSettings.ts

14 lines
335 B
TypeScript
Raw Normal View History

import {appSettings} from 'app/server/lib/AppSettings';
export function getTemplateOrg() {
let org = appSettings.section('templates').flag('org').readString({
envVar: 'GRIST_TEMPLATE_ORG',
});
if (!org) { return null; }
if (process.env.GRIST_ID_PREFIX) {
org += `-${process.env.GRIST_ID_PREFIX}`;
}
return org;
}