Merge branch 'master' of github.com:benallfree/pockethost

This commit is contained in:
Ben Allfree
2023-12-29 01:36:13 +00:00
2 changed files with 6 additions and 1 deletions

View File

@@ -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
}
}

View File

@@ -36,7 +36,7 @@ export const createInstanceMixin = (context: MixinContext) => {
): Promise<InstanceFields & WithUser> =>
client
.collection(INSTANCE_COLLECTION)
.getFirstListItem(`cname = '${host}' and cname_active = 1`, {
.getFirstListItem(`cname = '${host}'`, {
expand: 'uid',
})