12 lines
379 B
TypeScript
12 lines
379 B
TypeScript
import ListWhatsAppsService from "../WhatsappService/ListWhatsAppsService";
|
|
import { StartWhatsAppSession } from "./StartWhatsAppSession";
|
|
|
|
export const StartAllWhatsAppsSessions = async (): Promise<void> => {
|
|
const whatsapps = await ListWhatsAppsService();
|
|
if (whatsapps.length > 0) {
|
|
whatsapps.forEach(whatsapp => {
|
|
StartWhatsAppSession(whatsapp);
|
|
});
|
|
}
|
|
};
|