From a86efe97bb1e623a0f0cdf77f6d8343d5b182c49 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 29 May 2021 18:22:52 +0200 Subject: :art: reformat --- src/schema/User.ts | 54 +++++++----------------------------------------------- 1 file changed, 7 insertions(+), 47 deletions(-) (limited to 'src/schema/User.ts') diff --git a/src/schema/User.ts b/src/schema/User.ts index 15f27088..d5a7b909 100644 --- a/src/schema/User.ts +++ b/src/schema/User.ts @@ -1,53 +1,13 @@ -export const UserUpdateSchema = { - id: String, - username: String, - discriminator: String, - avatar: String || null, - $phone: String, - desktop: Boolean, - mobile: Boolean, - premium: Boolean, - premium_type: Number, - bot: Boolean, - system: Boolean, - nsfw_allowed: Boolean, - mfa_enabled: Boolean, - created_at: Date, - verified: Boolean, - $email: String, - flags: BigInt, - public_flags: BigInt, - $guilds: [String], -}; - -export interface UserUpdateSchema { - id: string; - username: string; - discriminator: string; - avatar: string | null; - phone?: string; - desktop: boolean; - mobile: boolean; - premium: boolean; - premium_type: number; - bot: boolean; - system: boolean; - nsfw_allowed: boolean; - mfa_enabled: boolean; - created_at: Date; - verified: boolean; - email?: string; - flags: bigint; - public_flags: bigint; - guilds: string[]; -} +import { Length } from "../util/instanceOf"; export const UserModifySchema = { - username: String, - avatar: String || null, + $username: new Length(String, 2, 32), + $avatar: String, + $bio: new Length(String, 0, 190) }; export interface UserModifySchema { - username: string; - avatar: string | null; + username?: string; + avatar?: string | null; + bio?: string; } -- cgit 1.5.1