Skip to content

Commit

Permalink
fix(meetings): H andle twilio end errors
Browse files Browse the repository at this point in the history
  • Loading branch information
HagerDakroury committed Jul 16, 2021
1 parent ffa6db5 commit b420c9d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions meetings/src/routes/end.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b420c9d

Please sign in to comment.