changed find to show services

This commit is contained in:
canove
2020-09-20 11:27:58 -03:00
parent 4fda0b18c6
commit 02d90af657
13 changed files with 40 additions and 59 deletions

View File

@@ -1,9 +1,8 @@
import AppError from "../errors/AppError";
import Whatsapp from "../models/Whatsapp";
import FindWhatsAppService from "../services/WhatsappService/FindWhatsAppService";
const GetDefaultWhatsapp = async (): Promise<Whatsapp> => {
const defaultWhatsapp = await FindWhatsAppService({
const GetDefaultWhatsApp = async (): Promise<Whatsapp> => {
const defaultWhatsapp = await Whatsapp.findOne({
where: { isDefault: true }
});
@@ -14,4 +13,4 @@ const GetDefaultWhatsapp = async (): Promise<Whatsapp> => {
return defaultWhatsapp;
};
export default GetDefaultWhatsapp;
export default GetDefaultWhatsApp;