mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
61f954ff05
* move getTemplateOrg method; enable template org in docker tests This moves the `getTemplateOrg` method to a neutral venue for the convenience of `grist-static`, otherwise a lot of awkward dependencies get pulled in needlessly in new parts of the app. This also fixes docker tests using the template org.
14 lines
335 B
TypeScript
14 lines
335 B
TypeScript
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;
|
|
}
|