diff --git a/app/scripts/initialTasks.js b/app/scripts/initialTasks.js index 583150e3..d2a4ddfc 100644 --- a/app/scripts/initialTasks.js +++ b/app/scripts/initialTasks.js @@ -13,11 +13,11 @@ console.log('domains---' + domains); // For multi tenant hosting if (domains[0] == "demo") { - $httpProvider.defaults.headers.common['X-Mifos-Platform-TenantId'] = 'default'; + $httpProvider.defaults.headers.common['Fineract-Platform-TenantId'] = 'default'; ResourceFactoryProvider.setTenantIdenetifier('default'); console.log("demo server", domains[0]); } else { - $httpProvider.defaults.headers.common['X-Mifos-Platform-TenantId'] = domains[0]; + $httpProvider.defaults.headers.common['Fineract-Platform-TenantId'] = domains[0]; ResourceFactoryProvider.setTenantIdenetifier(domains[0]); console.log("other than demo server", domains[0]); } @@ -37,10 +37,10 @@ host = "https://" + queryLink.hostname + (queryLink.port ? ':' + queryLink.port : ''); portNumber = queryLink.port; - $httpProvider.defaults.headers.common['X-Mifos-Platform-TenantId'] = 'default'; + $httpProvider.defaults.headers.common['Fineract-Platform-TenantId'] = 'default'; ResourceFactoryProvider.setTenantIdenetifier('default'); if (QueryParameters["tenantIdentifier"]) { - $httpProvider.defaults.headers.common['X-Mifos-Platform-TenantId'] = QueryParameters["tenantIdentifier"]; + $httpProvider.defaults.headers.common['Fineract-Platform-TenantId'] = QueryParameters["tenantIdentifier"]; ResourceFactoryProvider.setTenantIdenetifier(QueryParameters["tenantIdentifier"]); } } diff --git a/app/scripts/modules/configurations.js b/app/scripts/modules/configurations.js index ba03c5da..1be8f6ae 100644 --- a/app/scripts/modules/configurations.js +++ b/app/scripts/modules/configurations.js @@ -1,5 +1,5 @@ angular.module('configurations', []) - .constant('API_VERSION', '/mifosng-provider/api/v1') + .constant('API_VERSION', '/fineract-provider/api/v1') .constant('IDLE_DURATION', 30 * 60) .constant('WARN_DURATION', 10) .constant('KEEPALIVE_INTERVAL', 15 * 60) diff --git a/app/scripts/services/AuthenticationService.js b/app/scripts/services/AuthenticationService.js index 48fadb9b..a9a4f452 100644 --- a/app/scripts/services/AuthenticationService.js +++ b/app/scripts/services/AuthenticationService.js @@ -10,7 +10,7 @@ scope.$broadcast("UserAuthenticationFailureEvent", data, status); }; - var apiVer = '/mifosng-provider/api/v1'; + var apiVer = '/fineract-provider/api/v1'; var getUserDetails = function(data){ @@ -41,14 +41,14 @@ var getAccessToken = function(){ var refreshToken = localStorageService.getFromLocalStorage("tokendetails").refresh_token; httpService.cancelAuthorization(); - httpService.post( "/mifosng-provider/api/oauth/token?&client_id=community-app&grant_type=refresh_token&client_secret=123&refresh_token=" + refreshToken) + httpService.post( "/fineract-provider/api/oauth/token?&client_id=community-app&grant_type=refresh_token&client_secret=123&refresh_token=" + refreshToken) .success(updateAccessDetails); } this.authenticateWithUsernamePassword = function (credentials) { scope.$broadcast("UserAuthenticationStartEvent"); if(SECURITY === 'oauth'){ - httpService.post( "/mifosng-provider/api/oauth/token?username=" + credentials.username + "&password=" + credentials.password +"&client_id=community-app&grant_type=password&client_secret=123") + httpService.post( "/fineract-provider/api/oauth/token?username=" + credentials.username + "&password=" + credentials.password +"&client_id=community-app&grant_type=password&client_secret=123") .success(getUserDetails) .error(onFailure); } else { diff --git a/app/scripts/services/ResourceFactoryProvider.js b/app/scripts/services/ResourceFactoryProvider.js index e8eda95f..85f0266c 100755 --- a/app/scripts/services/ResourceFactoryProvider.js +++ b/app/scripts/services/ResourceFactoryProvider.js @@ -1,7 +1,7 @@ (function (module) { mifosX.services = _.extend(module, { ResourceFactoryProvider: function () { - var baseUrl = "" , apiVer = "/mifosng-provider/api/v1", tenantIdentifier = ""; + var baseUrl = "" , apiVer = "/fineract-provider/api/v1", tenantIdentifier = ""; this.setBaseUrl = function (url) { baseUrl = url; }; diff --git a/test/functional/demoTest.js b/test/functional/demoTest.js index bfc5fbfd..fb58edde 100644 --- a/test/functional/demoTest.js +++ b/test/functional/demoTest.js @@ -10,7 +10,7 @@ define(['mifosX', 'services/HttpServiceProvider', 'services/ResourceFactoryProvi return _.extend(config, {url: baseUrl + config.url}); });*/ - httpProvider.defaults.headers.common['X-Mifos-Platform-TenantId'] = 'default'; + httpProvider.defaults.headers.common['Fineract-Platform-TenantId'] = 'default'; }]).run(function ($log) { $log.warn("Using live demo server api -> " + baseUrl); }); diff --git a/test/spec/services/AuthenticationServiceSpec.js b/test/spec/services/AuthenticationServiceSpec.js index 4403f9ce..3eb1ab45 100644 --- a/test/spec/services/AuthenticationServiceSpec.js +++ b/test/spec/services/AuthenticationServiceSpec.js @@ -21,7 +21,7 @@ describe("AuthenticationService", function () { }); it("should pass the correct parameters to the post method", function () { - expect(httpService.post).toHaveBeenCalledWith("/mifosng-provider/api/v1/authentication?username=test_username&password=test_password"); + expect(httpService.post).toHaveBeenCalledWith("/fineract-provider/api/v1/authentication?username=test_username&password=test_password"); }); it("should broadcast 'UserAuthenticationStartEvent'", function () { diff --git a/test/spec/services/ResourceFactoryProviderSpec.js b/test/spec/services/ResourceFactoryProviderSpec.js index 214886cc..4bb46074 100644 --- a/test/spec/services/ResourceFactoryProviderSpec.js +++ b/test/spec/services/ResourceFactoryProviderSpec.js @@ -1,7 +1,7 @@ describe("ResourceFactoryProvider", function () { var ngResource, rootScope, - apiVersion = "/mifosng-provider/api/v1"; + apiVersion = "/fineract-provider/api/v1"; beforeEach(function () { this.provider = new mifosX.services.ResourceFactoryProvider(); ngResource = jasmine.createSpy("$resource").andReturn("test_resource");