2018-03-03 21:18:36 +00:00
|
|
|
/* (1) Load professors
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
/* (1) Initialize list */
|
|
|
|
gstore.add('professors', []);
|
|
|
|
|
|
|
|
/* (2) Get professors */
|
|
|
|
api.call('GET professor', {}, 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;
|
|
|
|
|
|
|
|
|
|
|
|
});
|