//relatorio import { Request, Response } from "express"; import AppError from "../errors/AppError"; import ShowTicketReport from "../services/TicketServices/ShowTicketReport"; type IndexQuery = { userId: string; startDate: string; endDate: string; }; /*export const reportUser = async (req: Request, res: Response): Promise => { const { userId } = req.params; console.log('******* Estrou no report: ', userId) const test = await ShowTicketReport(userId); return res.status(200).json(test); };*/ export const reportUserByDateStartDateEnd = async (req: Request, res: Response): Promise => { const { userId, startDate, endDate } = req.query as IndexQuery console.log('******* Estrou no report') console.log('******* userId: ', userId) console.log('******* startDate: ', startDate) console.log('******* endDate: ', endDate) const data_query = await ShowTicketReport(userId, startDate, endDate); return res.status(200).json(data_query); }; /*export const reportAll = async (req: Request, res: Response): Promise => { const test = await ShowTicketReport(); return res.status(200).json(test); };*/