changed ticket creation and list to typescript

This commit is contained in:
canove
2020-09-19 21:00:49 -03:00
parent 5dda3aabaf
commit 1d0bbda00d
16 changed files with 473 additions and 81 deletions

View File

@@ -3,7 +3,7 @@ import { Request, Response } from "express";
import CreateWhatsAppService from "../services/WhatsappService/CreateWhatsAppService";
import DeleteWhatsApprService from "../services/WhatsappService/DeleteWhatsApprService";
import ListWhatsAppsService from "../services/WhatsappService/ListWhatsAppsService";
import ShowWhatsAppService from "../services/WhatsappService/ShowWhatsAppService";
import FindWhatsAppService from "../services/WhatsappService/FindWhatsAppService";
import UpdateWhatsAppService from "../services/WhatsappService/UpdateWhatsAppService";
// import Yup from "yup";
// import Whatsapp from "../models/Whatsapp";
@@ -53,7 +53,7 @@ export const store = async (req: Request, res: Response): Promise<Response> => {
export const show = async (req: Request, res: Response): Promise<Response> => {
const { whatsappId } = req.params;
const whatsapp = await ShowWhatsAppService(whatsappId);
const whatsapp = await FindWhatsAppService(whatsappId);
return res.status(200).json(whatsapp);
};