summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@protonmail.com>2022-08-29 11:12:50 -0400
committerPuyodead1 <puyodead@protonmail.com>2022-08-29 11:12:50 -0400
commitfadf3c625bc98b3113db878952065063455b00c7 (patch)
tree1f2b0a5a537b583c3c2d1b2cf72badcee8c17fc2 /src/api
parentimplement guild profiles and fix user profiles (diff)
downloadserver-fadf3c625bc98b3113db878952065063455b00c7.tar.xz
Delete profile.ts
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/users/@me/profile.ts34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/api/routes/users/@me/profile.ts b/src/api/routes/users/@me/profile.ts
deleted file mode 100644
index 95aa8e6b..00000000
--- a/src/api/routes/users/@me/profile.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-// import { route } from "@fosscord/api";
-// import { emitEvent, handleFile, OrmUtils, PrivateUserProjection, User, UserUpdateEvent } from "@fosscord/util";
-// import { Request, Response, Router } from "express";
-// import { UserProfileModifySchema } from "../../../../util/schemas/UserProfileModifySchema";
-
-// const router: Router = Router();
-
-// router.patch("/", route({ body: "UserProfileModifySchema" }), async (req: Request, res: Response) => {
-// 	const body = req.body as UserProfileModifySchema;
-
-// 	if (body.banner) body.banner = await handleFile(`/banners/${req.user_id}`, body.banner as string);
-// 	let user = await User.findOneOrFail({ where: { id: req.user_id }, select: [...PrivateUserProjection, "data"] });
-
-// 	user = OrmUtils.mergeDeep(user, body);
-// 	await user.save();
-
-// 	// @ts-ignore
-// 	delete user.data;
-
-// 	// TODO: send update member list event in gateway
-// 	await emitEvent({
-// 		event: "USER_UPDATE",
-// 		user_id: req.user_id,
-// 		data: user
-// 	} as UserUpdateEvent);
-
-// 	res.json({
-// 		accent_color: user.accent_color,
-// 		bio: user.bio,
-// 		banner: user.banner
-// 	});
-// });
-
-// export default router;