Make org subnet optional

This commit is contained in:
Owen
2025-07-16 11:35:38 -07:00
parent 1dff9baa61
commit 021bc073a2
6 changed files with 31 additions and 4 deletions

View File

@@ -120,6 +120,15 @@ export async function createClient(
);
}
if (!org.subnet) {
return next(
createHttpError(
HttpCode.BAD_REQUEST,
`Organization with ID ${orgId} has no subnet defined`
)
);
}
if (!isIpInCidr(subnet, org.subnet)) {
return next(
createHttpError(