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
commit3cd404eb422fb2bac358264227839f15ba241f45 (patch)
treed9ec2cfdb39275a189c1b84eb2f906b5e58051cd /api
parentMerge pull request #345 from fosscord/revert-344-master (diff)
downloadserver-3cd404eb422fb2bac358264227839f15ba241f45.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);
 });