From d90fd6b4e53eb056c579db736d9874f521319ba9 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 2 Apr 2023 11:15:08 +1000 Subject: Update connection metadata visibility --- .../users/@me/connections/#connection_name/#connection_id/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/api') diff --git a/src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts b/src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts index 6a8d31ca..afb0df06 100644 --- a/src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts +++ b/src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts @@ -4,7 +4,7 @@ import { ConnectionUpdateSchema, DiscordApiErrors, emitEvent, -} from "@spacevar/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; const router = Router(); @@ -44,6 +44,9 @@ router.patch( if (typeof body.show_activity === "boolean") //@ts-expect-error For some reason the client sends this as a boolean, even tho docs say its a number? body.show_activity = body.show_activity ? 1 : 0; + if (typeof body.metadata_visibility === "boolean") + //@ts-expect-error For some reason the client sends this as a boolean, even tho docs say its a number? + body.metadata_visibility = body.metadata_visibility ? 1 : 0; connection.assign(req.body); -- cgit 1.5.1