Use more async funcs in runtime/lib/api to reduce Promise creation

This commit is contained in:
Nick O'Leary
2020-11-30 16:58:05 +00:00
parent 5992ed1fab
commit a1f565f756
7 changed files with 419 additions and 484 deletions

View File

@@ -71,7 +71,7 @@ var api = module.exports = {
* @return {Promise} - the node information
* @memberof @node-red/runtime_context
*/
getValue: function(opts) {
getValue: async function(opts) {
return new Promise(function(resolve,reject) {
var scope = opts.scope;
var id = opts.id;
@@ -165,7 +165,7 @@ var api = module.exports = {
* @return {Promise} - the node information
* @memberof @node-red/runtime_context
*/
delete: function(opts) {
delete: async function(opts) {
return new Promise(function(resolve,reject) {
var scope = opts.scope;
var id = opts.id;