all routes changed to typescript

This commit is contained in:
canove
2020-09-19 09:40:24 -03:00
parent 99fa2cea61
commit 0ea4dbea51
11 changed files with 469 additions and 270 deletions

View File

@@ -109,7 +109,8 @@ export const store = async (req: Request, res: Response): Promise<Response> => {
}
const ticket: Ticket = await defaultWhatsapp.$create("ticket", req.body);
const contact = await ticket.$get("contact");
await ticket.$get("contact");
const wapp = await ticket.$get("whatsapp");
@@ -122,7 +123,7 @@ export const store = async (req: Request, res: Response): Promise<Response> => {
// ticket: serializaedTicket
// });
return res.status(200).json({ ticket, contact, wapp, tickets });
return res.status(200).json({ ticket });
};
// export const update = (req: Request, res: Response): Promise<Response> => {