More Whatsapp Docker updates

This commit is contained in:
Darren Clarke 2024-05-17 09:20:00 +02:00
parent 3da103c010
commit e26e5832ff
8 changed files with 63 additions and 21 deletions

View file

@ -22,14 +22,14 @@ export class Whatsapp extends Service {
.where("id", "=", id)
.execute();
revalidatePath(`/whatsapp/${id}`);
if (!json.verified) {
const url = `${process.env.BRIDGE_WHATSAPP_URL}/api/bots/${id}/register`;
const result = await fetch(url, { method: "POST", cache: "no-store" });
const result = await fetch(url, { method: "POST" });
console.log({ result2: result });
}
revalidatePath(`/whatsapp/${id}`);
return NextResponse.json(json);
}
}