fix: notification order
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 7s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 7s
This commit is contained in:
parent
071262a85a
commit
c6a56df94a
1 changed files with 5 additions and 1 deletions
|
|
@ -64,7 +64,11 @@ export class NotificationController extends Controller {
|
|||
},
|
||||
};
|
||||
const [result, total] = await prisma.$transaction([
|
||||
prisma.notification.findMany({ where, include: { readByUser: true } }),
|
||||
prisma.notification.findMany({
|
||||
where,
|
||||
include: { readByUser: true },
|
||||
orderBy: { createdAt: "desc" },
|
||||
}),
|
||||
prisma.notification.count({ where }),
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue