Merge dev into fix/log-analytics-adjustments

This commit is contained in:
Fred KISSIE
2025-12-10 03:19:14 +01:00
parent 9db2feff77
commit d490cab48c
555 changed files with 9375 additions and 9287 deletions

View File

@@ -11,16 +11,16 @@ import { OpenAPITags, registry } from "@server/openApi";
import { getServerIp } from "@server/lib/serverIpService"; // your in-memory IP module
const getDNSRecordsSchema = z.strictObject({
domainId: z.string(),
orgId: z.string()
});
domainId: z.string(),
orgId: z.string()
});
async function query(domainId: string) {
const records = await db
.select()
.from(dnsRecords)
.where(eq(dnsRecords.domainId, domainId));
return records;
}
@@ -72,8 +72,11 @@ export async function getDNSRecords(
const serverIp = getServerIp();
// Override value for type A or wildcard records
const updatedRecords = records.map(record => {
if ((record.recordType === "A" || record.baseDomain === "*") && serverIp) {
const updatedRecords = records.map((record) => {
if (
(record.recordType === "A" || record.baseDomain === "*") &&
serverIp
) {
return { ...record, value: serverIp };
}
return record;
@@ -92,4 +95,4 @@ export async function getDNSRecords(
createHttpError(HttpCode.INTERNAL_SERVER_ERROR, "An error occurred")
);
}
}
}