mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-27 19:43:09 +02:00
fix(backend) api/iの未読のお知らせにcreatedAtを追加するように修正 (#12092)
Co-authored-by: sorairo <sorairo@shiosyakeyakini.info>
This commit is contained in:
parent
3e5c55c14e
commit
6d6ddbc35e
1 changed files with 5 additions and 1 deletions
|
@ -322,7 +322,11 @@ export class UserEntityService implements OnModuleInit {
|
|||
|
||||
const isModerator = isMe && opts.detail ? this.roleService.isModerator(user) : null;
|
||||
const isAdmin = isMe && opts.detail ? this.roleService.isAdministrator(user) : null;
|
||||
const unreadAnnouncements = isMe && opts.detail ? await this.announcementService.getUnreadAnnouncements(user) : null;
|
||||
const unreadAnnouncements = isMe && opts.detail ?
|
||||
(await this.announcementService.getUnreadAnnouncements(user)).map((announcement) => ({
|
||||
createdAt: this.idService.parse(announcement.id).date.toISOString(),
|
||||
...announcement,
|
||||
})) : null;
|
||||
|
||||
const falsy = opts.detail ? false : undefined;
|
||||
|
||||
|
|
Loading…
Reference in a new issue