summary refs log tree commit diff
path: root/api/src/routes/users/@me/channels.ts
diff options
context:
space:
mode:
authoruurgothat <cckhmck@gmail.com>2021-10-24 18:13:51 +0300
committeruurgothat <cckhmck@gmail.com>2021-10-24 18:13:51 +0300
commitb603b81629a7775914dcb4eae53f418c3620dbdd (patch)
treeb13cc06dcf49ebe49ffff452758e3849baa0ca2f /api/src/routes/users/@me/channels.ts
parentFormat the file (diff)
parentMerge pull request #492 from fosscord/translation (diff)
downloadserver-ts-b603b81629a7775914dcb4eae53f418c3620dbdd.tar.xz
Merge branch 'master' of https://github.com/fosscord/fosscord-server
Diffstat (limited to 'api/src/routes/users/@me/channels.ts')
-rw-r--r--api/src/routes/users/@me/channels.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/api/src/routes/users/@me/channels.ts b/api/src/routes/users/@me/channels.ts

index b5782eca..78f531e1 100644 --- a/api/src/routes/users/@me/channels.ts +++ b/api/src/routes/users/@me/channels.ts
@@ -5,8 +5,11 @@ import { route } from "@fosscord/api"; const router: Router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { - const recipients = await Recipient.find({ where: { user_id: req.user_id, closed: false }, relations: ["channel", "channel.recipients"] }); - res.json(await Promise.all(recipients.map(r => DmChannelDTO.from(r.channel, [req.user_id])))); + const recipients = await Recipient.find({ + where: { user_id: req.user_id, closed: false }, + relations: ["channel", "channel.recipients"] + }); + res.json(await Promise.all(recipients.map((r) => DmChannelDTO.from(r.channel, [req.user_id])))); }); export interface DmChannelCreateSchema {