style: clean up code formatting and remove trailing whitespace
refactor: reorganize imports and fix type imports
This commit is contained in:
1 parent
d3704602fd
commit
47c04de6fe
232 files changed
+7140
-4798
No files matched your search
@@ -2,8 +2,8 @@
|
||||
* Schemas de validação para Chat usando Zod
|
||||
*/
|
||||
|
||||
import { z } from "zod";
|
||||
import sanitizeHtml from "sanitize-html";
|
||||
import { z } from "zod";
|
||||
|
||||
// Schema para criar chat
|
||||
export const createChatSchema = z.object({
|
||||
@@ -17,7 +17,9 @@ export const sendMessageSchema = z.object({
|
||||
.string()
|
||||
.min(1, "Mensagem não pode estar vazia")
|
||||
.max(1000, "Mensagem muito longa (máximo 1000 caracteres)")
|
||||
.transform((val) => sanitizeHtml(val.trim(), { allowedTags: [], allowedAttributes: {} })),
|
||||
.transform((val) =>
|
||||
sanitizeHtml(val.trim(), { allowedTags: [], allowedAttributes: {} }),
|
||||
),
|
||||
});
|
||||
|
||||
// Schema para query params de mensagens
|
||||
@@ -25,4 +27,3 @@ export const getMessagesSchema = z.object({
|
||||
page: z.coerce.number().int().positive().default(1),
|
||||
limit: z.coerce.number().int().positive().max(100).default(50),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user