mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fix insert and del
This commit is contained in:
@@ -44,7 +44,6 @@ export const registerDNSMadeEasyConnectionRouter = async (server: FastifyZodProv
|
||||
onRequest: verifyAuth([AuthMode.JWT]),
|
||||
handler: async (req) => {
|
||||
const { connectionId } = req.params;
|
||||
|
||||
const zones = await server.services.appConnection.dnsMadeEasy.listZones(connectionId, req.permission);
|
||||
return zones;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { request } from "@app/lib/config/request";
|
||||
import { crypto } from "@app/lib/crypto/cryptography";
|
||||
import { TDNSMadeEasyConnection } from "@app/services/app-connection/dns-made-easy/dns-made-easy-connection-types";
|
||||
import { IntegrationUrls } from "@app/services/integration-auth/integration-list";
|
||||
import { logger } from "@app/lib/logger";
|
||||
|
||||
const getDNSMadeEasyUrl = (path: string) => {
|
||||
const appCfg = getConfig();
|
||||
@@ -100,7 +101,7 @@ export const dnsMadeEasyDeleteTxtRecord = async (
|
||||
|
||||
if (Array.isArray(dnsRecords) && dnsRecords.length > 0) {
|
||||
const recordToDelete = dnsRecords.find(
|
||||
(record) => record.type === "TXT" && record.name === domain && record.value === value
|
||||
(record) => record.type === "TXT" && record.name === domain && JSON.parse(record.value) === value
|
||||
);
|
||||
|
||||
if (recordToDelete) {
|
||||
@@ -113,6 +114,8 @@ export const dnsMadeEasyDeleteTxtRecord = async (
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
logger.warn({ domain, value }, `Record to delete not found for domain: ${domain} and value: ${value}`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user