summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-02 11:15:08 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-02 11:15:08 +1000
commitd90fd6b4e53eb056c579db736d9874f521319ba9 (patch)
tree9120fade51b13b419fc5bd87814202534c56a659 /src/api
parentMerge branch 'master' into refactor/dev/connections (diff)
downloadserver-d90fd6b4e53eb056c579db736d9874f521319ba9.tar.xz
Update connection metadata visibility
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts5
1 files changed, 4 insertions, 1 deletions
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);