cloud-function-nodejs-samples icon indicating copy to clipboard operation
cloud-function-nodejs-samples copied to clipboard

faas-sdk init - starts with broken code

Open piejanssens opened this issue 4 years ago • 0 comments

In the index.js

module.exports = function(event, context) {
    const rv = context.getSecretValueJSON('my-new-sec', 'rv.json');
    return rv.Info.Success;
};

has to be changed to this

module.exports = async function(event, context) {
    const rv = await context.getSecretValueJSON('my-new-sec', 'rv.json');
    return rv.Info.Success;
};

piejanssens avatar Sep 25 '20 04:09 piejanssens