This commit is contained in:
syuilo 2024-01-22 17:44:03 +09:00
parent 94e282b612
commit 4af3640bd3
4 changed files with 21 additions and 8 deletions

View file

@ -177,9 +177,10 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit {
case 'userRoleAssigned': {
const cached = this.roleAssignmentByUserIdCache.get(body.userId);
if (cached) {
cached.push({
cached.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい
...body,
expiresAt: body.expiresAt ? new Date(body.expiresAt) : null,
user: null, // joinなカラムは通常取ってこないので
});
}
break;