I've been scratching my head over on how to promisify this call and return data to another function when it becomes available.
syno.query('/webapi/query.cgi', {
api : 'SYNO.API.Info',
version: 1,
method : 'query',
query : 'ALL'
}, function(err, data) {
if (err) return console.error(err);
console.log(data);
});
Can anybody shed some light here ? I'm new to nodejs
the old library that I'm using is this one https://www.npmjs.com/package/synology