order notifications by date

This commit is contained in:
OxSaitama 2023-10-24 21:52:07 +02:00
parent db7e77ea8a
commit 0c1fc12ed9
2 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,7 @@ export interface IGetNotificationsParams {
where?: {}; where?: {};
include?: {}; include?: {};
select?: {}; select?: {};
orderBy?: {};
} }
export type IPutNotificationsParams = { export type IPutNotificationsParams = {

View File

@ -39,6 +39,12 @@ export default function Navigation() {
where: { where: {
read: false, read: false,
}, },
include: {
notification: true
},
orderBy: {
notification: {created_at: "desc"},
}
}); });
notifications.forEach((notification) => { notifications.forEach((notification) => {
Toasts.getInstance().open({ Toasts.getInstance().open({