diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-08-21 20:00:35 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-08-21 20:00:35 +1000 |
commit | af2f9a402f103c973eefc894764633f6082cddfa (patch) | |
tree | f3e09fa5b4442fef6bdb6a6d379debc91ae5f24f /api/src | |
parent | fosscord-server/pulls/858 (diff) | |
download | server-af2f9a402f103c973eefc894764633f6082cddfa.tar.xz |
Fix /users/@me/settings get and migrarion
Diffstat (limited to 'api/src')
-rw-r--r-- | api/src/routes/users/@me/settings.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/src/routes/users/@me/settings.ts b/api/src/routes/users/@me/settings.ts index 50a00cac..787ea9d4 100644 --- a/api/src/routes/users/@me/settings.ts +++ b/api/src/routes/users/@me/settings.ts @@ -4,13 +4,13 @@ import { route } from "@fosscord/api"; const router = Router(); -export interface UserSettingsSchema extends Partial<UserSettings> {} +export interface UserSettingsSchema extends Partial<UserSettings> { } router.get("/", route({}), async (req: Request, res: Response) => { const user = await User.findOneOrFail( { id: req.user_id }, - { relations: ["settings"] } - ) + { select: ["settings"] } + ); return res.json(user.settings); }); |