Fix the linking out and deleting for target ones

This commit is contained in:
Owen
2026-04-21 17:02:21 -07:00
parent 90eb6d66c0
commit 13afa90d28
2 changed files with 26 additions and 12 deletions

View File

@@ -17,7 +17,7 @@ import HttpCode from "@server/types/HttpCode";
import createHttpError from "http-errors";
import logger from "@server/logger";
import { OpenAPITags, registry } from "@server/openApi";
import { and, eq, like, sql } from "drizzle-orm";
import { and, eq, isNotNull, like, sql } from "drizzle-orm";
import { NextFunction, Request, Response } from "express";
import { z } from "zod";
import { fromError } from "zod-validation-error";
@@ -85,6 +85,7 @@ export async function listHealthChecks(
const whereClause = and(
eq(targetHealthCheck.orgId, orgId),
isNotNull(targetHealthCheck.hcMode), // filter out the null ones attached to targets
query
? like(
sql`LOWER(${targetHealthCheck.name})`,