Update recent-calls.js (#549)

This commit is contained in:
Sam Machin
2026-04-14 13:19:42 +01:00
committed by GitHub
parent 001ef66000
commit fb54f562f7
+3 -3
View File
@@ -104,7 +104,7 @@ router.get('/:call_sid/logs', async(req, res) => {
const aws_region = process.env.AWS_REGION;
const {call_sid} = req.params;
const {logGroupName = 'jambonz-feature_server'} = req.query;
const account_sid = parseAccountSid(req.originalUrl);
const account_sid = parseAccountSid(req);
if (!aws_region) {
return res.status(400).send({msg: 'Logs are only available in AWS environments'});
}
@@ -185,7 +185,7 @@ router.get('/:call_sid/record/:year/:month/:day/:format', async(req, res) => {
const {call_sid, year, month, day, format} = req.params;
try {
const account_sid = parseAccountSid(req.originalUrl);
const account_sid = parseAccountSid(req);
const r = await Account.retrieve(account_sid);
if (r.length === 0 || !r[0].bucket_credential) return res.sendStatus(404);
const {bucket_credential} = r[0];
@@ -228,7 +228,7 @@ router.delete('/:call_sid/record/:year/:month/:day/:format', async(req, res) =>
const {call_sid, year, month, day, format} = req.params;
try {
const account_sid = parseAccountSid(req.originalUrl);
const account_sid = parseAccountSid(req);
const r = await Account.retrieve(account_sid);
if (r.length === 0 || !r[0].bucket_credential) return res.sendStatus(404);
const {bucket_credential} = r[0];