From f1395003ee84e185ec796b033af314dcd1eac368 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Fri, 26 Jan 2024 13:01:28 -0300 Subject: [PATCH] Fix comments --- src/data-schemas/auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data-schemas/auth.ts b/src/data-schemas/auth.ts index 38eafd9..0f8eed6 100644 --- a/src/data-schemas/auth.ts +++ b/src/data-schemas/auth.ts @@ -5,14 +5,14 @@ import { ApiError } from 'utils/apiError'; import { errors } from 'config/errors'; import { formatZodError } from 'utils/validator'; -const passwordLength = 10; +const MINIMUM_PASSWORD_LENGTH = 10; const userCreationSchema = z.object({ email: z.string().email({ message: 'Invalid email' }), name: z.string(), password: z .string() - .min(passwordLength, { message: "Can't be an empty password" }), + .min(MINIMUM_PASSWORD_LENGTH, { message: "Can't be an empty password" }), }); export type UserCreationSchema = z.infer; @@ -21,7 +21,7 @@ const loginSchema = z.object({ email: z.string().email({ message: 'Invalid email' }), password: z .string() - .min(passwordLength, { message: "Can't be an empty password" }), + .min(MINIMUM_PASSWORD_LENGTH, { message: "Can't be an empty password" }), }); export type UserLoginSchema = z.infer;