Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

interface-ipfs-core config API spec compliant #307

Merged
merged 1 commit into from
Jul 2, 2016
Merged

Conversation

daviddias
Copy link
Contributor

WIP

}

if (!key) {
return send('config/show', null, null, null, true, callback)
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably be valuable for the send method to accept a config argument rather than having a parameter list filled with nulls

Copy link
Contributor Author

Choose a reason for hiding this comment

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

💯 agree. In fact, what I'm very much thinking is after merging the config-api PR into ipfs-api/ng branch, just make a PR to update how request-api.js works, break the tests (so that we don't have to run 300 tests while developing a single feature) and clean up whatever else I find.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is happening :) 43a1dfa

@daviddias daviddias force-pushed the config-api branch 3 times, most recently from a318463 to be4f964 Compare July 1, 2016 10:35
if (typeof config === 'object') {
config = streamifier.createReadStream(new Buffer(JSON.stringify(config)))
return send('config/replace', null, null, config, callback)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just missing to make the config.replace tests to work. It seems that this was never working (see https://github.com/ipfs/js-ipfs-api/blob/master/test/api/config.spec.js#L123-L133), unfortunately.

The current problem is that the config never gets replaced and after we send the replace, the content type of the following config.get requests becomes text/plain instead of application/json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Learned that this is an error in actual go-ipfs ipfs/kubo#2927

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

Successfully merging this pull request may close these issues.

2 participants