Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Bug in feeds.create_data() #13

Open
oddguid opened this issue Nov 19, 2016 · 0 comments
Open

Bug in feeds.create_data() #13

oddguid opened this issue Nov 19, 2016 · 0 comments

Comments

@oddguid
Copy link

oddguid commented Nov 19, 2016

Hi,

The function feeds.create_data(data, cb) does not send the passed in data, but sends a null value instead. The problem is the following function (feeds.js, line 140-146):

`proto.create_data = function(data, cb) {

var data = new Data(this.key, this.id);

return data.create(data, cb);

};
`

Here the input parameter data is redefined as a new variable, which means the actual data is not passed to data.create(data, cb). A simple fix is to rename the local variable:

`proto.create_data = function(data, cb) {

var senddata = new Data(this.key, this.id);

return senddata.create(data, cb);

};
`

However this code is generated using swagger, which makes this fix unusable. Other options are fixing the code generator to not use 'data' as a local variable name or renaming the parameter 'data' in the REST API.

The function feeds.write() seems to be a usable workaround.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant