@@ -20,12 +20,12 @@ angular.module('GSB.services.availableClasses', ['GSB.config'])
2020
2121 // Get Available Subject Classes from Server
2222
23- $http . get ( globalConfig . baseURL + 'mockup/classes.json' )
24- . success ( function ( data ) {
23+ return $http . get ( globalConfig . baseURL + 'mockup/classes.json' )
24+ . then ( function ( response ) {
2525
2626 $log . info ( 'Available Classes loaded from server.' ) ;
27-
28- var availClasses = data . results . bindings ;
27+
28+ var availClasses = response . data . results . bindings ;
2929
3030 for ( var key in availClasses ) {
3131 if ( availClasses . hasOwnProperty ( key ) ) {
@@ -38,9 +38,9 @@ angular.module('GSB.services.availableClasses', ['GSB.config'])
3838 ) ;
3939 }
4040 }
41- } )
42- . error ( function ( ) {
43- $log . error ( 'Available Classes could not be loaded from server.' ) ;
41+
42+ } , function ( error ) {
43+ $log . error ( error , 'Available Classes could not be loaded from server.' ) ;
4444 } ) ;
4545 } ;
4646
@@ -106,11 +106,9 @@ angular.module('GSB.services.availableClasses', ['GSB.config'])
106106 //Retrieve Properties from Server and add them to availableProperties
107107 return $http . get ( globalConfig . baseURL + uri )
108108 . then ( function ( response ) {
109- $log . info ( 'Response: ' , response ) ;
110109 var availableProperties = createAvailablePropertyObject ( response . data . results . bindings ) ;
111110 $log . info ( ' Properties loaded from: ' + uri , response ) ;
112111
113- $log . info ( 'getaP' , availableProperties ) ;
114112 return availableProperties ;
115113
116114 } , function ( response ) {
0 commit comments