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;