TT#18169 CSC Reminder fix

Change-Id: I5b0bab2cc10a1421efdf299e60e9f55465c2fbe3
changes/41/14141/1
Carlo 8 years ago
parent eb5330942e
commit 304907ac9a

@ -26,12 +26,15 @@ Ext.define('NgcpCsc.proxy.NgcpApi', {
var me = this;
var action = request._action;
var url, records;
if(!me.addSubscriber){
me.params = 'subscriber_id=' + localStorage.getItem('subscriber_id');
}
switch (action) {
case 'read':
me.headers = {
'Content-Type': 'application/json'
};
url = Ext.String.format('{0}{1}/{2}?{3}', me.baseApiUrl, me.route, localStorage.getItem('subscriber_id'), me.params);
url = Ext.String.format('{0}{1}/{2}?{3}', me.baseApiUrl, me.route, me.addSubscriber ? localStorage.getItem('subscriber_id') : '', me.params);
break;
case 'update':
me.headers = (me.actionMethods.update == 'PUT') ? {
@ -41,7 +44,7 @@ Ext.define('NgcpCsc.proxy.NgcpApi', {
};
records = request._records;
url = Ext.String.format('{0}{1}/{2}', me.baseApiUrl, me.route, localStorage.getItem('subscriber_id'));
url = Ext.String.format('{0}{1}/{2}', me.baseApiUrl, me.route, me.addSubscriber ? localStorage.getItem('subscriber_id') : records[0].get('id'));
break;
}
request._url = url;

@ -10,6 +10,7 @@ Ext.define('NgcpCsc.store.CallBlocking', {
proxy: {
type: 'ngcp-api',
route: 'subscriberpreferences',
addSubscriber: true,
actionMethods: {
read: 'GET',
update: 'PATCH'

Loading…
Cancel
Save