diff --git a/meetings/src/routes/end.ts b/meetings/src/routes/end.ts index d37b5e6..8b71689 100644 --- a/meetings/src/routes/end.ts +++ b/meetings/src/routes/end.ts @@ -51,12 +51,10 @@ router.post(`${baseUrl}/end/:id`, async (req: Request, res: Response) => { await meeting.save(); //end the meeting twilio - client.video + const room: { uniquename: any } = client.video .rooms(meeting.sid) - .update({ status: "completed" }) - .then((room: { uniquename: any }) => { - return res.status(201).send("Meeting ended sccessfully"); - }); + .update({ status: "completed" }); + res.status(201).send("Meeting ended sccessfully"); } catch (error) { return res.status(400).send(error.message); }