22
33var module = angular . module ( 'supportAdminApp' ) ;
44
5- module . controller ( 'IdeasDetailController' , [ '$scope' , '$log' , 'IdeaService' , 'Alert' , '$timeout' , 'OAuth2Service' , '$uibModalInstance' , 'ideaId' , 'domain' , 'username' , 'password' , 'clientId' , '$sce' , 'SPIGIT_API_URL' ,
6- function ( $scope , $log , IdeaService , $alert , $timeout , OAuth2Service , $modalInstance , ideaId , domain , username , password , clientId , $sce , SPIGIT_API_URL ) {
5+ module . controller ( 'IdeasDetailController' , [ '$scope' , '$log' , 'IdeaService' , 'Alert' , '$timeout' , 'OAuth2Service' , '$uibModalInstance' , 'ideaId' , 'domain' , 'username' , 'password' , 'clientId' , 'clientSecret' , ' $sce', 'SPIGIT_API_URL' ,
6+ function ( $scope , $log , IdeaService , $alert , $timeout , OAuth2Service , $modalInstance , ideaId , domain , username , password , clientId , clientSecret , $sce , SPIGIT_API_URL ) {
77
88 $scope . ideaId = ideaId ;
99 $scope . domain = domain ;
1010 $scope . username = username ;
1111 $scope . password = password ;
1212 $scope . clientId = clientId ;
13+ $scope . clientSecret = clientSecret ;
1314
1415 $scope . form = { } ;
1516 $scope . isLoading = false ;
@@ -20,7 +21,7 @@ module.controller('IdeasDetailController', ['$scope', '$log','IdeaService', 'Al
2021
2122 // If token expired should get new token first
2223 if ( OAuth2Service . checkTokenExpireTime ( ) ) {
23- OAuth2Service . refreshToken ( $scope . username , $scope . password , $scope . domain , $scope . clientId ) . then ( function ( data ) {
24+ OAuth2Service . refreshToken ( $scope . username , $scope . password , $scope . domain , $scope . clientId , $scope . clientSecret ) . then ( function ( data ) {
2425 $scope . loadDetail ( ) ;
2526 } ) . catch ( function ( error ) {
2627 $alert . error ( error . message , $scope ) ;
0 commit comments