From 7a3196625d48f35e943c1dd7248738118feaea72 Mon Sep 17 00:00:00 2001 From: aurik3 Date: Tue, 25 Oct 2022 10:12:00 -0500 Subject: [PATCH] update update code --- api.js | 1 + components/chatting.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api.js b/api.js index 251510e..3854096 100644 --- a/api.js +++ b/api.js @@ -65,6 +65,7 @@ client.on("message", async (msg) => { client.on("disconnected", () => { console.log("disconnected"); }); + client.initialize(); const chatRoute = require("./components/chatting"); diff --git a/components/chatting.js b/components/chatting.js index ce4bfd7..bf044ac 100644 --- a/components/chatting.js +++ b/components/chatting.js @@ -29,7 +29,7 @@ router.post('/sendmessage', async (req,res) => { } }); -router.post('/sendimage/:phone', async (req,res) => { +router.post('/sendimage/', async (req,res) => { var base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; let phone = req.body.phone;