Skip to content
Snippets Groups Projects
Unverified Commit 6d6ddbc3 authored by shiosyakeyakini's avatar shiosyakeyakini Committed by GitHub
Browse files

fix(backend) api/iの未読のお知らせにcreatedAtを追加するように修正 (#12092)


Co-authored-by: default avatarsorairo <sorairo@shiosyakeyakini.info>
parent 3e5c55c1
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment