From a879bb95caa0dbebe849c4ce4795b37f8e69d747 Mon Sep 17 00:00:00 2001 From: canove Date: Sun, 20 Sep 2020 11:40:18 -0300 Subject: [PATCH] fix: no extra info in contacts --- backend/src/services/ContactServices/ShowContactService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/services/ContactServices/ShowContactService.ts b/backend/src/services/ContactServices/ShowContactService.ts index 2852dba..a301cc2 100644 --- a/backend/src/services/ContactServices/ShowContactService.ts +++ b/backend/src/services/ContactServices/ShowContactService.ts @@ -2,7 +2,7 @@ import Contact from "../../models/Contact"; import AppError from "../../errors/AppError"; const ShowContactService = async (id: string | number): Promise => { - 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);