diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-04-19 01:24:51 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-04-19 01:24:51 +1000 |
commit | 4c6b1e8e16a1f44dc7c5f9abd74c0615d0e4e51c (patch) | |
tree | f9d9858cc5e2ffab76aa2f15d8d99a2facd35902 /src/api | |
parent | Enforce theme_colors to be ints (diff) | |
download | server-4c6b1e8e16a1f44dc7c5f9abd74c0615d0e4e51c.tar.xz |
Fix UserRelationsResponse schema
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/routes/users/#id/relationships.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/routes/users/#id/relationships.ts b/src/api/routes/users/#id/relationships.ts index 7accad3b..3737ca00 100644 --- a/src/api/routes/users/#id/relationships.ts +++ b/src/api/routes/users/#id/relationships.ts @@ -17,7 +17,7 @@ */ import { route } from "@spacebar/api"; -import { User } from "@spacebar/util"; +import { User, UserRelationsResponse } from "@spacebar/util"; import { Request, Response, Router } from "express"; const router: Router = Router(); @@ -33,7 +33,8 @@ router.get( }, }), async (req: Request, res: Response) => { - const mutual_relations: object[] = []; + const mutual_relations: UserRelationsResponse = []; + const requested_relations = await User.findOneOrFail({ where: { id: req.params.id }, relations: ["relationships"], |