mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-19 08:48:34 +02:00
Remove subnet check on the org for now
This commit is contained in:
parent
963bc5f0bc
commit
84ca275f1e
1 changed files with 14 additions and 13 deletions
|
@ -89,21 +89,22 @@ export async function createOrg(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: for now we are making all of the orgs the same subnet
|
||||||
// make sure the subnet is unique
|
// make sure the subnet is unique
|
||||||
const subnetExists = await db
|
// const subnetExists = await db
|
||||||
.select()
|
// .select()
|
||||||
.from(orgs)
|
// .from(orgs)
|
||||||
.where(eq(orgs.subnet, subnet))
|
// .where(eq(orgs.subnet, subnet))
|
||||||
.limit(1);
|
// .limit(1);
|
||||||
|
|
||||||
if (subnetExists.length > 0) {
|
// if (subnetExists.length > 0) {
|
||||||
return next(
|
// return next(
|
||||||
createHttpError(
|
// createHttpError(
|
||||||
HttpCode.CONFLICT,
|
// HttpCode.CONFLICT,
|
||||||
`Subnet ${subnet} already exists`
|
// `Subnet ${subnet} already exists`
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
// make sure the orgId is unique
|
// make sure the orgId is unique
|
||||||
const orgExists = await db
|
const orgExists = await db
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue