fix: add no-prisma-delete lint

This commit is contained in:
DecDuck
2025-11-21 23:04:00 +11:00
parent f1fccd9bff
commit 650a3ca98d
18 changed files with 97 additions and 54 deletions

View File

@ -259,16 +259,10 @@ class FsHashStore {
*/
async delete(id: ObjectReference) {
await this.cache.remove(id);
try {
// need to catch in case the object doesn't exist
await prisma.objectHash.delete({
where: {
id,
},
});
} catch {
/* empty */
}
await prisma.objectHash.deleteMany({
where: {
id,
},
});
}
}