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

Bug in feeds.create_data() #13

@oddguid

Description

@oddguid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions