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 | 82235d10b72257eb10634a7846c0689040cf8eec (patch) | |
tree | 92b9c3c65a3c76d6597b5f7b7c652073d29773e2 /api/src/routes | |
parent | Merge pull request #345 from fosscord/revert-344-master (diff) | |
download | server-82235d10b72257eb10634a7846c0689040cf8eec.tar.xz |
Fix relationships get query
Diffstat (limited to 'api/src/routes')
-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); }); |