mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 01:24:58 +02:00
Add missing await
This commit is contained in:
parent
1f42409826
commit
9f0c9c595d
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ export async function getUniqueName(orgId: string): Promise<string> {
|
|||
}
|
||||
|
||||
const name = generateName();
|
||||
const count = await db.select({niceId: sites.niceId, orgId: sites.orgId}).from(sites).where(and(eq(sites.niceId, name), eq(sites.orgId, orgId)));
|
||||
const count = await db.select({ niceId: sites.niceId, orgId: sites.orgId }).from(sites).where(and(eq(sites.niceId, name), eq(sites.orgId, orgId)));
|
||||
if (count.length === 0) {
|
||||
return name;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue