fix: isDomainConfigured
This commit is contained in:
parent
b04d75ab08
commit
b29c1e702a
@ -22,15 +22,15 @@ export async function isSecretExists({ id, name }) {
|
|||||||
export async function isDomainConfigured({ id, fqdn }) {
|
export async function isDomainConfigured({ id, fqdn }) {
|
||||||
const domain = getDomain(fqdn);
|
const domain = getDomain(fqdn);
|
||||||
const foundApp = await prisma.application.findFirst({
|
const foundApp = await prisma.application.findFirst({
|
||||||
where: { fqdn: { endsWith: domain }, id: { not: id } },
|
where: { fqdn: { endsWith: `//${domain}` }, id: { not: id } },
|
||||||
select: { fqdn: true }
|
select: { fqdn: true }
|
||||||
});
|
});
|
||||||
const foundService = await prisma.service.findFirst({
|
const foundService = await prisma.service.findFirst({
|
||||||
where: { fqdn: { endsWith: domain }, id: { not: id } },
|
where: { fqdn: { endsWith: `//${domain}` }, id: { not: id } },
|
||||||
select: { fqdn: true }
|
select: { fqdn: true }
|
||||||
});
|
});
|
||||||
const coolifyFqdn = await prisma.setting.findFirst({
|
const coolifyFqdn = await prisma.setting.findFirst({
|
||||||
where: { fqdn: { endsWith: domain }, id: { not: id } },
|
where: { fqdn: { endsWith: `//${domain}` }, id: { not: id } },
|
||||||
select: { fqdn: true }
|
select: { fqdn: true }
|
||||||
});
|
});
|
||||||
if (foundApp || foundService || coolifyFqdn) return true;
|
if (foundApp || foundService || coolifyFqdn) return true;
|
||||||
|
@ -63,7 +63,5 @@ export default async function () {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
throw error;
|
throw error;
|
||||||
} finally {
|
|
||||||
// await reloadHaproxy('/var/run/docker.sock');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user