fix: ignore error if we are unable to blacklist certificate

This commit is contained in:
DecDuck
2025-05-07 12:16:09 +10:00
parent c0c55d35f4
commit 770294d559

View File

@ -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<boolean> {
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;
},
};