mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
fix count in list domains endpoint
This commit is contained in:
@@ -80,15 +80,15 @@ export async function listDomains(
|
||||
|
||||
const { orgId } = parsedParams.data;
|
||||
|
||||
const domains = await queryDomains(orgId.toString(), limit, offset);
|
||||
const domainsList = await queryDomains(orgId.toString(), limit, offset);
|
||||
|
||||
const [{ count }] = await db
|
||||
.select({ count: sql<number>`count(*)` })
|
||||
.from(users);
|
||||
.from(domains);
|
||||
|
||||
return response<ListDomainsResponse>(res, {
|
||||
data: {
|
||||
domains,
|
||||
domains: domainsList,
|
||||
pagination: {
|
||||
total: count,
|
||||
limit,
|
||||
|
||||
Reference in New Issue
Block a user