mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-06 12:19:50 +00:00
Merge branch 'refactor/show-if-client-needs-update' of github.com:Fredkiss3/pangolin into dev
This commit is contained in:
@@ -1,20 +1,21 @@
|
|||||||
import {
|
import {
|
||||||
db,
|
db,
|
||||||
exitNodes,
|
exitNodes,
|
||||||
|
labels,
|
||||||
newts,
|
newts,
|
||||||
orgs,
|
orgs,
|
||||||
remoteExitNodes,
|
remoteExitNodes,
|
||||||
roleSites,
|
roleSites,
|
||||||
|
siteLabels,
|
||||||
siteNetworks,
|
siteNetworks,
|
||||||
siteResources,
|
siteResources,
|
||||||
targets,
|
|
||||||
sites,
|
sites,
|
||||||
|
targets,
|
||||||
userSites,
|
userSites,
|
||||||
labels,
|
|
||||||
siteLabels,
|
|
||||||
type Label
|
type Label
|
||||||
} from "@server/db";
|
} from "@server/db";
|
||||||
import { regionalCache as cache } from "#dynamic/lib/cache";
|
import { regionalCache as cache } from "#dynamic/lib/cache";
|
||||||
|
import { tierMatrix } from "@server/lib/billing/tierMatrix";
|
||||||
import response from "@server/lib/response";
|
import response from "@server/lib/response";
|
||||||
import logger from "@server/logger";
|
import logger from "@server/logger";
|
||||||
import { OpenAPITags, registry } from "@server/openApi";
|
import { OpenAPITags, registry } from "@server/openApi";
|
||||||
@@ -23,11 +24,9 @@ import type { PaginatedResponse } from "@server/types/Pagination";
|
|||||||
import { and, asc, desc, eq, inArray, like, or, sql } from "drizzle-orm";
|
import { and, asc, desc, eq, inArray, like, or, sql } from "drizzle-orm";
|
||||||
import { NextFunction, Request, Response } from "express";
|
import { NextFunction, Request, Response } from "express";
|
||||||
import createHttpError from "http-errors";
|
import createHttpError from "http-errors";
|
||||||
import semver from "semver";
|
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { fromError } from "zod-validation-error";
|
import { fromError } from "zod-validation-error";
|
||||||
import { isLicensedOrSubscribed } from "#dynamic/lib/isLicencedOrSubscribed";
|
import { isLicensedOrSubscribed } from "#dynamic/lib/isLicencedOrSubscribed";
|
||||||
import { tierMatrix } from "@server/lib/billing/tierMatrix";
|
|
||||||
|
|
||||||
const listSitesParamsSchema = z.strictObject({
|
const listSitesParamsSchema = z.strictObject({
|
||||||
orgId: z.string()
|
orgId: z.string()
|
||||||
@@ -356,6 +355,8 @@ export async function listSites(
|
|||||||
siteListQuery
|
siteListQuery
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const totalCount = Number(countRows[0]?.count ?? 0);
|
||||||
|
|
||||||
const siteIds = rows.map((site) => site.siteId);
|
const siteIds = rows.map((site) => site.siteId);
|
||||||
|
|
||||||
let labelsForSites: Array<{
|
let labelsForSites: Array<{
|
||||||
|
|||||||
Reference in New Issue
Block a user