summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorAlTech98 <altech123159@gmail.com>2021-09-09 18:32:36 +0200
committerAlTech98 <altech123159@gmail.com>2021-09-09 18:32:36 +0200
commit82235d10b72257eb10634a7846c0689040cf8eec (patch)
tree92b9c3c65a3c76d6597b5f7b7c652073d29773e2 /api
parentMerge pull request #345 from fosscord/revert-344-master (diff)
downloadserver-82235d10b72257eb10634a7846c0689040cf8eec.tar.xz
Fix relationships get query
Diffstat (limited to 'api')
-rw-r--r--api/src/routes/users/@me/relationships.ts2
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);
 });