diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
commit | 849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50 (patch) | |
tree | 37c9af175c98116a0f48ca2d5c8b74f291b3ce85 /src/api/routes/users/@me/index.ts | |
parent | Fix scripts/benchmark/connections.js (diff) | |
download | server-849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50.tar.xz |
Move schemas to /src/util/schemas
Diffstat (limited to 'src/api/routes/users/@me/index.ts')
-rw-r--r-- | src/api/routes/users/@me/index.ts | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/api/routes/users/@me/index.ts b/src/api/routes/users/@me/index.ts index 36b62b55..e849b72a 100644 --- a/src/api/routes/users/@me/index.ts +++ b/src/api/routes/users/@me/index.ts @@ -1,31 +1,11 @@ import { Router, Request, Response } from "express"; -import { User, PrivateUserProjection, emitEvent, UserUpdateEvent, handleFile, FieldErrors, adjustEmail, Config } from "@fosscord/util"; +import { User, PrivateUserProjection, emitEvent, UserUpdateEvent, handleFile, FieldErrors, adjustEmail, Config, UserModifySchema } from "@fosscord/util"; import { route } from "@fosscord/api"; import bcrypt from "bcrypt"; import { HTTPError } from "lambert-server"; const router: Router = Router(); -export interface UserModifySchema { - /** - * @minLength 1 - * @maxLength 100 - */ - username?: string; - avatar?: string | null; - /** - * @maxLength 1024 - */ - bio?: string; - accent_color?: number; - banner?: string | null; - password?: string; - new_password?: string; - code?: string; - email?: string; - discriminator?: string; -} - router.get("/", route({}), async (req: Request, res: Response) => { res.json(await User.findOne({ select: PrivateUserProjection, where: { id: req.user_id } })); }); |