mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 20:29:17 +00:00
all routes changed to typescript
This commit is contained in:
13
backend/src/services/WhatsappService/ListWhatsAppsService.ts
Normal file
13
backend/src/services/WhatsappService/ListWhatsAppsService.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import Whatsapp from "../../models/Whatsapp";
|
||||
|
||||
interface Response {
|
||||
whatsapps: Whatsapp[];
|
||||
}
|
||||
|
||||
const ListWhatsAppsService = async (): Promise<Response> => {
|
||||
const whatsapps = await Whatsapp.findAll();
|
||||
|
||||
return { whatsapps };
|
||||
};
|
||||
|
||||
export default ListWhatsAppsService;
|
||||
Reference in New Issue
Block a user