Sakén
Sakén

Reputation: 314

async await not woring in Dreamfactory node.js scripts

1. const getAsset = async (assetName) => {
2.    const url = `/database/_table/asset?filter=(name=${assetName})`;
3.    return await df.get(url);
4. }

Line 1: Expected '(' and instead saw '{' Line 2: Expected an identifier and instead saw 'const' (A reserved keyword)

no matter how I use I'm getting all sorts of errors

1. async function getAsset(assetName) {
2.    const url = `/database/_table/asset?filter=(name=${assetName})`;
3.    return await df.get(url);
4. }

As far as I know the node.js version in Dreamfactory is 8.11.4

Upvotes: 0

Views: 31

Answers (0)

Related Questions