fix: remove deletedAt filter
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
This commit is contained in:
parent
32be0d8831
commit
8d08b0ed9c
@ -20,12 +20,12 @@ export class AdminFilesController {
|
||||
const p = parseInt(page), l = parseInt(limit);
|
||||
const [items, total] = await Promise.all([
|
||||
this.prisma.uploadedFile.findMany({
|
||||
where: { deletedAt: null },
|
||||
where: {},
|
||||
orderBy: { createdAt: 'desc' },
|
||||
skip: (p - 1) * l, take: l,
|
||||
include: { user: { select: { nickname: true, email: true } } },
|
||||
}),
|
||||
this.prisma.uploadedFile.count({ where: { deletedAt: null } }),
|
||||
this.prisma.uploadedFile.count({ where: {} }),
|
||||
]);
|
||||
return { items, total, page: p, limit: l, totalPages: Math.ceil(total / l) };
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user