Commit 01ed5ea1 authored by Prayas Jain's avatar Prayas Jain

Updated accounts and domain api with changed url

parent 8e6dc07b
...@@ -46,9 +46,10 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo ...@@ -46,9 +46,10 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$scope.getAccountDetails(); $scope.getAccountDetails();
} }
$scope.getAccountDetails = function(){ $scope.getAccountDetails = function(){
var empId = myFactory.getEmpId();
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "accounts" url : appConfig.appUri + "accountsByLoginId?loginId="+empId
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
if(response.data.records.length > 10){ if(response.data.records.length > 10){
$scope.gridOptions.enablePaginationControls = true; $scope.gridOptions.enablePaginationControls = true;
......
...@@ -107,9 +107,11 @@ myApp.controller("domainController", ...@@ -107,9 +107,11 @@ myApp.controller("domainController",
} }
$scope.getDomains = function() { $scope.getDomains = function() {
var empId = myFactory.getEmpId();
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "domains" //url : appConfig.appUri + "domains"
url : appConfig.appUri + "domainsByLoginId?loginId="+empId
}) })
.then( .then(
function mySuccess(response) { function mySuccess(response) {
......
...@@ -87,9 +87,11 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window ...@@ -87,9 +87,11 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
}); });
}; };
function getAllAccounts(){ function getAllAccounts(){
var empId = myFactory.getEmpId();
$http({ $http({
method : "GET", method : "GET",
url : appConfig.appUri + "accounts" //url : appConfig.appUri + "accounts"
url : appConfig.appUri + "accountsByLoginId?loginId="+empId
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
var accounts = response.data.records; var accounts = response.data.records;
myFactory.setAccounts(accounts); myFactory.setAccounts(accounts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment