(core) show any error when creating initial team site with GRIST_SINGLE_ORG

Summary: Also clarifies that only lowercase letters are accepted.

Test Plan: manual

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D3647
This commit is contained in:
Paul Fitzpatrick
2022-09-29 08:14:10 -04:00
parent 198beaab2a
commit 0eb1fec3d7
3 changed files with 6 additions and 5 deletions

View File

@@ -86,14 +86,14 @@ export async function main() {
// This should not happen.
throw new Error('failed to create GRIST_DEFAULT_EMAIL user');
}
await db.addOrg(user, {
db.unwrapQueryResult(await db.addOrg(user, {
name: org,
domain: org,
}, {
setUserAsOwner: false,
useNewPlan: true,
planType: TEAM_FREE_PLAN
});
}));
}
}
@@ -102,6 +102,7 @@ export async function main() {
if (process.env.GRIST_TESTING_SOCKET) {
await server.addTestingHooks();
}
return server;
}
if (require.main === module) {