Add ESLint (#941)
* Add eslint, switch to lint-staged for precommit * Fix all ESLint errors * Update GH workflow to check prettier and eslint
This commit is contained in:
@@ -44,16 +44,14 @@ export class DmChannelDTO {
|
||||
obj.type = channel.type;
|
||||
obj.recipients = (
|
||||
await Promise.all(
|
||||
channel
|
||||
.recipients!.filter(
|
||||
(r) => !excluded_recipients.includes(r.user_id),
|
||||
)
|
||||
channel.recipients
|
||||
?.filter((r) => !excluded_recipients.includes(r.user_id))
|
||||
.map(async (r) => {
|
||||
return await User.findOneOrFail({
|
||||
where: { id: r.user_id },
|
||||
select: PublicUserProjection,
|
||||
});
|
||||
}),
|
||||
}) || [],
|
||||
)
|
||||
).map((u) => new MinimalPublicUserDTO(u));
|
||||
return obj;
|
||||
|
||||
Reference in New Issue
Block a user