// DEBUG... COMENTAR DEPOIS
//_log.info('service called...');

const dbAstroTypes = _db.query(`
  SELECT id, uid, name 
  FROM astro_type
  WHERE active = TRUE
`);

const astroTypes = _val.list();
for (const type of dbAstroTypes) {
  astroTypes.add(
      _val.map()
            .set('uid', type.getString('uid'))
            .set('code', type.getString('id'))  
            .set('name', type.getString('name'))    
  );
}

// DEBUG...COMENTAR DEPOIS!
//_log.info( 'DB return...', astroTypes );

_out.json(astroTypes);

// DEBUG...COMENTAR DEPOIS!
//_log.info('service ended!');