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