fix: references

This commit is contained in:
Oleg Proskurin 2025-11-17 00:39:18 +07:00
parent 2656b208c5
commit 8d1da7364a
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import { eq, and, isNull, desc, count, sql } from 'drizzle-orm'; import { eq, and, isNull, desc, count, inArray } from 'drizzle-orm';
import { db } from '@/db'; import { db } from '@/db';
import { images, flows } from '@banatie/database'; import { images, flows } from '@banatie/database';
import type { Image, NewImage, ImageFilters } from '@/types/models'; import type { Image, NewImage, ImageFilters } from '@/types/models';
@ -198,7 +198,7 @@ export class ImageService {
return await db.query.images.findMany({ return await db.query.images.findMany({
where: and( where: and(
sql`${images.id} = ANY(${ids})`, inArray(images.id, ids),
isNull(images.deletedAt) isNull(images.deletedAt)
), ),
}); });