Skip to content

Conversation

@AnjaBruls
Copy link
Contributor

This resolves #128 .

@AnjaBruls AnjaBruls requested a review from joente June 16, 2021 12:08

onSetModuleConf(nodeId, name, configuration, tag, cb) {
const query = `set_module_conf('${name}', ${configuration ? `'${configuration}'` : 'nil'});`;
const query = `set_module_conf('${name}', ${configuration ? `${configuration}` : 'nil'});`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use query arguments instead of "building' the query, thus:

query = set_module_conf(name, configuration);

and as arguments:

{
  "name": name,
  "configuration: configuration
}

This way, it is also fine if configuration is nil, since that will be correctly packed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be changed in a later release (~v0.4.4).

Copy link
Member

@joente joente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of query building, it would be an improvement to use query arguments instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants