19 lines
429 B
JavaScript
19 lines
429 B
JavaScript
/* (1) Load professors
|
|
---------------------------------------------------------*/
|
|
/* (1) Initialize list */
|
|
gstore.add('professors', []);
|
|
|
|
/* (2) Get professors */
|
|
api.call('GET professor/1/', { vh: true }, function(rs){
|
|
|
|
// {1} If error -> abort //
|
|
if( rs.error !== 0 )
|
|
return console.log('No professor found, error: '+rs.error);
|
|
|
|
// {2} Store professors //
|
|
console.log(rs);
|
|
gstore.get.professors = rs.professors;
|
|
|
|
|
|
});
|