summary refs log tree commit diff
path: root/src/api/routes/users/@me/channels.ts
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-19 21:06:12 +0100
committerRory& <root@rory.gay>2025-12-19 21:06:12 +0100
commit6162fbd5205f805b6f67fdf2f8ab9cce0c03aec2 (patch)
tree37a7a9d9ecd10307a05ee3aa50f5e18e335d0d7a /src/api/routes/users/@me/channels.ts
parentprettier: ignore schemaExclusions.json (diff)
downloadserver-ts-6162fbd5205f805b6f67fdf2f8ab9cce0c03aec2.tar.xz
Deprecation: Use object-based relations for typeorm
Diffstat (limited to 'src/api/routes/users/@me/channels.ts')
-rw-r--r--src/api/routes/users/@me/channels.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/users/@me/channels.ts b/src/api/routes/users/@me/channels.ts

index e13b874a..897630ce 100644 --- a/src/api/routes/users/@me/channels.ts +++ b/src/api/routes/users/@me/channels.ts
@@ -35,7 +35,7 @@ router.get( async (req: Request, res: Response) => { const recipients = await Recipient.find({ where: { user_id: req.user_id, closed: false }, - relations: ["channel", "channel.recipients"], + relations: { channel: { recipients: true } }, }); res.json(await Promise.all(recipients.map((r) => DmChannelDTO.from(r.channel, [req.user_id])))); },