From fadf3c625bc98b3113db878952065063455b00c7 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Mon, 29 Aug 2022 11:12:50 -0400 Subject: Delete profile.ts --- src/api/routes/users/@me/profile.ts | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/api/routes/users/@me/profile.ts 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; -- cgit 1.4.1