fix: no extra info in contacts

This commit is contained in:
canove
2020-09-20 11:40:18 -03:00
parent 02d90af657
commit a879bb95ca

View File

@@ -2,7 +2,7 @@ import Contact from "../../models/Contact";
import AppError from "../../errors/AppError";
const ShowContactService = async (id: string | number): Promise<Contact> => {
const user = await Contact.findByPk(id);
const user = await Contact.findByPk(id, { include: ["extraInfo"] });
if (!user) {
throw new AppError("No contact found with this ID.", 404);