diff --git a/whapps/voip/prompt/prompt.js b/whapps/voip/prompt/prompt.js index 3143bed4..6803d38e 100644 --- a/whapps/voip/prompt/prompt.js +++ b/whapps/voip/prompt/prompt.js @@ -299,20 +299,20 @@ winkstart.module('voip', 'prompt', { prompts = []; $.each(data, function(k,v) { - var promptSplit = v.split('%2F'), + var name = v.id, + promptSplit = name.split('%2F'), prompt = {}; prompt.language = promptSplit.length > 1 ? promptSplit[0] : '-'; if(THIS.adminMode) { - prompt.link = apiUrl + '/accounts/media/' + v + '/raw?auth_token=' + authToken; + prompt.link = apiUrl + '/accounts/media/' + name + '/raw?auth_token=' + authToken; } else { - prompt.link = apiUrl + '/accounts/' + accountId + '/media/' + v + '/raw?auth_token=' + authToken; + prompt.link = apiUrl + '/accounts/' + accountId + '/media/' + name + '/raw?auth_token=' + authToken; } - - prompt.id = v; + prompt.id = name; prompts.push(prompt); });