diff options
author | AlTech98 <altech123159@gmail.com> | 2021-09-09 18:32:36 +0200 |
---|---|---|
committer | AlTech98 <altech123159@gmail.com> | 2021-09-09 18:32:36 +0200 |
commit | 3cd404eb422fb2bac358264227839f15ba241f45 (patch) | |
tree | d9ec2cfdb39275a189c1b84eb2f906b5e58051cd /api | |
parent | Merge pull request #345 from fosscord/revert-344-master (diff) | |
download | server-3cd404eb422fb2bac358264227839f15ba241f45.tar.xz |
Fix relationships get query
Diffstat (limited to 'api')
-rw-r--r-- | api/src/routes/users/@me/relationships.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/users/@me/relationships.ts b/api/src/routes/users/@me/relationships.ts index 8d6d8c9e..995b0244 100644 --- a/api/src/routes/users/@me/relationships.ts +++ b/api/src/routes/users/@me/relationships.ts @@ -19,7 +19,7 @@ const router = Router(); const userProjection: (keyof User)[] = ["relationships", ...PublicUserProjection]; router.get("/", async (req: Request, res: Response) => { - const user = await User.findOneOrFail({ where: { id: req.user_id }, select: ["relationships"] }); + const user = await User.findOneOrFail({ where: { id: req.user_id }, relations: ["relationships"] }); return res.json(user.relationships); }); |