Skip to content
Snippets Groups Projects
Commit b3ab96b5 authored by syuilo's avatar syuilo
Browse files

fix(backend): ロールアサインの通知がある状態でページをリロードすると通知欄に何もでなくなる

Fix #12729
parent 15b0d2af
No related branches found
No related tags found
No related merge requests found
...@@ -219,6 +219,8 @@ export class NotificationEntityService implements OnModuleInit { ...@@ -219,6 +219,8 @@ export class NotificationEntityService implements OnModuleInit {
}); });
} }
const role = notification.type === 'roleAssigned' ? await this.roleEntityService.pack(notification.roleId) : undefined;
return await awaitAll({ return await awaitAll({
id: notification.id, id: notification.id,
createdAt: new Date(notification.createdAt).toISOString(), createdAt: new Date(notification.createdAt).toISOString(),
...@@ -229,6 +231,9 @@ export class NotificationEntityService implements OnModuleInit { ...@@ -229,6 +231,9 @@ export class NotificationEntityService implements OnModuleInit {
...(notification.type === 'reaction' ? { ...(notification.type === 'reaction' ? {
reaction: notification.reaction, reaction: notification.reaction,
} : {}), } : {}),
...(notification.type === 'roleAssigned' ? {
role: role,
} : {}),
...(notification.type === 'achievementEarned' ? { ...(notification.type === 'achievementEarned' ? {
achievement: notification.achievement, achievement: notification.achievement,
} : {}), } : {}),
......
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