(email: string)
| 17 | import { prisma } from "../prisma"; |
| 18 | |
| 19 | const validateEmail = (email: string) => { |
| 20 | return String(email) |
| 21 | .toLowerCase() |
| 22 | .match( |
| 23 | /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ |
| 24 | ); |
| 25 | }; |
| 26 | |
| 27 | export function ticketRoutes(fastify: FastifyInstance) { |
| 28 | // Create a new ticket - public endpoint, no preHandler needed |