Skip to content

Commit

Permalink
Merge pull request #29 from AplinkosMinisterija/get-apps-by-user-fix
Browse files Browse the repository at this point in the history
get apps by user fix
  • Loading branch information
ambrazasp authored Nov 5, 2024
2 parents fb66100 + 04f90dd commit 62ee66c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion services/inheritedUserApps.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ export default class InheritedUserAppsService extends moleculer.Service {
return userWithApps[ids] || [];
}

return userWithApps;
return ids.reduce(
(acc, item) => ({
...acc,
[item]: userWithApps[item] || [],
}),
{},
);
}

@Action({
Expand Down

0 comments on commit 62ee66c

Please sign in to comment.