From 2b6da4ded7947555f31ed0fd04e4b23289d30e95 Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Thu, 28 Dec 2023 17:35:33 -0800 Subject: [PATCH] bugfix: instance activation --- src/services/InstanceService/index.ts | 5 +++++ src/services/MothershipAdmimClientService/InstanceMIxin.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/services/InstanceService/index.ts b/src/services/InstanceService/index.ts index 88c9127a..0b94fe8a 100644 --- a/src/services/InstanceService/index.ts +++ b/src/services/InstanceService/index.ts @@ -410,6 +410,11 @@ export const instanceService = mkSingleton( }) if (instance) { dbg(`${host} is a cname`) + if (!instance.cname_active) { + throw new Error( + `CNAME not active for this instance. See dashboard.`, + ) + } return instance } } diff --git a/src/services/MothershipAdmimClientService/InstanceMIxin.ts b/src/services/MothershipAdmimClientService/InstanceMIxin.ts index a7035aac..b2b66aa7 100644 --- a/src/services/MothershipAdmimClientService/InstanceMIxin.ts +++ b/src/services/MothershipAdmimClientService/InstanceMIxin.ts @@ -36,7 +36,7 @@ export const createInstanceMixin = (context: MixinContext) => { ): Promise => client .collection(INSTANCE_COLLECTION) - .getFirstListItem(`cname = '${host}' and cname_active = 1`, { + .getFirstListItem(`cname = '${host}'`, { expand: 'uid', })