diff --git a/server/internal/clients/ca-store.ts b/server/internal/clients/ca-store.ts index 15fe49e..fc7f1c6 100644 --- a/server/internal/clients/ca-store.ts +++ b/server/internal/clients/ca-store.ts @@ -70,14 +70,17 @@ export const dbCertificateStore = () => { }; }, async blacklistCertificate(name: string) { - await prisma.certificate.update({ - where: { - id: name, - }, - data: { - blacklisted: true, - }, - }); + try { + await prisma.certificate.update({ + where: { + id: name, + }, + data: { + blacklisted: true, + }, + }); + } finally { + } }, async checkBlacklistCertificate(name: string): Promise { const result = await prisma.certificate.findUnique({ @@ -88,7 +91,7 @@ export const dbCertificateStore = () => { blacklisted: true, }, }); - if (result === null) return false; + if (result === null) return true; return result.blacklisted; }, };