refactor
This commit is contained in:
parent
1e14102316
commit
f69867fcff
3 changed files with 7 additions and 141 deletions
|
|
@ -89,5 +89,9 @@ export default define(meta, async (ps, user) => {
|
|||
}
|
||||
}
|
||||
|
||||
return ps.withUnreads ? announcements.filter((a: any) => !a.isRead) : announcements;
|
||||
return (ps.withUnreads ? announcements.filter((a: any) => !a.isRead) : announcements).map((a) => ({
|
||||
...a,
|
||||
createdAt: a.createdAt.toISOString(),
|
||||
updatedAt: a.updatedAt?.toISOString() ?? null,
|
||||
}));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue