mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-05-06 08:47:00 +00:00
Update recent-calls.js (#549)
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user