change 'default' to 'isDefault' whatsapp field on frontend

This commit is contained in:
canove
2020-09-20 11:12:32 -03:00
parent aa6f116514
commit 0f0d9470c5
5 changed files with 39 additions and 55 deletions

View File

@@ -1,13 +1,9 @@
import Whatsapp from "../../models/Whatsapp";
interface Response {
whatsapps: Whatsapp[];
}
const ListWhatsAppsService = async (): Promise<Response> => {
const ListWhatsAppsService = async (): Promise<Whatsapp[]> => {
const whatsapps = await Whatsapp.findAll();
return { whatsapps };
return whatsapps;
};
export default ListWhatsAppsService;