summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-23 12:45:03 +1100
committerPuyodead1 <puyodead@proton.me>2023-03-18 19:23:57 -0400
commit5491c58ffc83a3172a400eb2764b34cdf7265aa5 (patch)
tree25a21d49ba819151e61e893af948b84ae4af50a6 /src/api
parent`handleCallback` returns connection if created for `USER_CONNECTIONS_UPDATE` (diff)
downloadserver-5491c58ffc83a3172a400eb2764b34cdf7265aa5.tar.xz
Don't use mergeDeep
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts8
1 files changed, 2 insertions, 6 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 76eb9936..3138d872 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
@@ -1,10 +1,6 @@
 import { route } from "@fosscord/api";
+import { ConnectedAccount, DiscordApiErrors } from "@fosscord/util";
 import { Request, Response, Router } from "express";
-import {
-	ConnectedAccount,
-	DiscordApiErrors,
-	OrmUtils,
-} from "../../../../../../../util";
 const router = Router();
 
 // TODO: connection update schema
@@ -35,7 +31,7 @@ router.patch(
 
 		if (!connection) return DiscordApiErrors.UNKNOWN_CONNECTION;
 		// TODO: do we need to do anything if the connection is revoked?
-		OrmUtils.mergeDeep(connection, req.body);
+		connection.assign(req.body);
 		await ConnectedAccount.update(
 			{
 				user_id: req.user_id,