Fix ESLint issues: prefer-const warnings and missing semicolons

Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-07-22 19:07:43 +00:00
parent 4f5091ed7f
commit 2259879595
39 changed files with 50 additions and 62 deletions

View File

@@ -2,7 +2,7 @@ import { db } from "@server/db";
import { resources, targets } from "@server/db";
import { eq } from "drizzle-orm";
let currentBannedPorts: number[] = [];
const currentBannedPorts: number[] = [];
export async function pickPort(siteId: number): Promise<{
internalPort: number;
@@ -15,8 +15,8 @@ export async function pickPort(siteId: number): Promise<{
// TODO: is this all inefficient?
// Fetch targets for all resources of this site
let targetIps: string[] = [];
let targetInternalPorts: number[] = [];
const targetIps: string[] = [];
const targetInternalPorts: number[] = [];
await Promise.all(
resourcesRes.map(async (resource) => {
const targetsRes = await db

View File

@@ -35,7 +35,7 @@ const listTargetsSchema = z.object({
});
function queryTargets(resourceId: number) {
let baseQuery = db
const baseQuery = db
.select({
targetId: targets.targetId,
ip: targets.ip,
@@ -99,7 +99,7 @@ export async function listTargets(
const baseQuery = queryTargets(resourceId);
let countQuery = db
const countQuery = db
.select({ count: sql<number>`cast(count(*) as integer)` })
.from(targets)
.where(eq(targets.resourceId, resourceId));