mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 19:59:20 +00:00
feat: show an alert when connection with whatsapp brokes
This commit is contained in:
@@ -7,6 +7,7 @@ import Whatsapp from "../../models/Whatsapp";
|
||||
interface WhatsappData {
|
||||
name?: string;
|
||||
status?: string;
|
||||
session?: string;
|
||||
isDefault?: boolean;
|
||||
}
|
||||
|
||||
@@ -29,7 +30,7 @@ const UpdateWhatsAppService = async ({
|
||||
isDefault: Yup.boolean()
|
||||
});
|
||||
|
||||
const { name, status, isDefault } = whatsappData;
|
||||
const { name, status, isDefault, session } = whatsappData;
|
||||
|
||||
try {
|
||||
await schema.validate({ name, status, isDefault });
|
||||
@@ -58,6 +59,7 @@ const UpdateWhatsAppService = async ({
|
||||
await whatsapp.update({
|
||||
name,
|
||||
status,
|
||||
session,
|
||||
isDefault
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user