Also limit to org

This commit is contained in:
Owen
2025-07-18 11:48:14 -07:00
parent dca2a29865
commit afea958aca
2 changed files with 17 additions and 13 deletions

View File

@@ -129,17 +129,17 @@ export async function createSite(
);
}
if (!org.subnet) {
return next(
createHttpError(
HttpCode.BAD_REQUEST,
`Organization with ID ${orgId} has no subnet defined`
)
);
}
let updatedAddress = null;
if (address) {
if (!org.subnet) {
return next(
createHttpError(
HttpCode.BAD_REQUEST,
`Organization with ID ${orgId} has no subnet defined`
)
);
}
if (!isValidIP(address)) {
return next(
createHttpError(