Correção no codigo para funcionamento do AutoRestore quando o status da conexão estiver no status Pending
parent
46da991216
commit
ab1c89631e
|
@ -41,7 +41,7 @@ export const index = async (req: Request, res: Response): Promise<Response> => {
|
|||
|
||||
console.log('PAGE NUMBER CONTACT: ', pageNumber)
|
||||
|
||||
if ( pageNumber === undefined || pageNumber.trim().length == 0) {
|
||||
if (pageNumber === undefined || pageNumber.trim().length == 0) {
|
||||
pageNumber = '1'
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ export const store = async (req: Request, res: Response): Promise<Response> => {
|
|||
|
||||
try {
|
||||
await schema.validate(newContact);
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
throw new AppError(err.message);
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ export const update = async (
|
|||
|
||||
try {
|
||||
await schema.validate(contactData);
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
throw new AppError(err.message);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,14 +60,14 @@ export const StartWhatsAppSession = async (whatsapp: Whatsapp, backupSession: bo
|
|||
const _whatsapp = await Whatsapp.findOne({ where: { id: autoR.whatsappId } });
|
||||
|
||||
let whatsappStatus = ["CONFLICT",
|
||||
"DEPRECATED_VERSION ",
|
||||
"OPENING ",
|
||||
"PROXYBLOCK ",
|
||||
"SMB_TOS_BLOCK ",
|
||||
"TIMEOUT ",
|
||||
"TOS_BLOCK ",
|
||||
"UNLAUNCHED ",
|
||||
"UNPAIRED ",
|
||||
"DEPRECATED_VERSION",
|
||||
"OPENING",
|
||||
"PROXYBLOCK",
|
||||
"SMB_TOS_BLOCK",
|
||||
"TIMEOUT",
|
||||
"TOS_BLOCK",
|
||||
"UNLAUNCHED",
|
||||
"UNPAIRED",
|
||||
"UNPAIRED_IDLE"]
|
||||
|
||||
if (_whatsapp?.status) {
|
||||
|
|
Loading…
Reference in New Issue