bugfix: adding account-level speech credential with platform owner api key

This commit is contained in:
Dave Horton
2021-08-30 12:37:08 -04:00
parent 446cc57e09
commit 5350f7bea0
+1 -1
View File
@@ -14,7 +14,7 @@ const {
router.post('/', async(req, res) => {
const logger = req.app.locals.logger;
const {use_for_stt, use_for_tts, vendor, service_key, access_key_id, secret_access_key, aws_region} = req.body;
const {account_sid} = req.user;
const account_sid = req.user.account_sid || req.body.account_sid;
let service_provider_sid;
if (!account_sid) {
if (!req.user.hasServiceProviderAuth) {