mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-22 20:51:12 +10:00
fix: add no-prisma-delete lint
This commit is contained in:
@ -124,7 +124,10 @@ class NewsManager {
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
const article = await prisma.article.delete({
|
||||
const article = await prisma.article.findUnique({ where: { id } });
|
||||
if (!article) return false;
|
||||
// eslint-disable-next-line drop/no-prisma-delete
|
||||
await prisma.article.delete({
|
||||
where: { id },
|
||||
});
|
||||
if (article.imageObjectId) {
|
||||
|
||||
Reference in New Issue
Block a user