mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-22 04:31:15 +10:00
fix: add no-prisma-delete lint
This commit is contained in:
@ -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,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user