Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Extract http api from modules - Closes #455 #467

Merged
merged 32 commits into from
Mar 16, 2017

Conversation

MaciejBaj
Copy link
Contributor

@MaciejBaj MaciejBaj commented Mar 8, 2017

Move all linkage with http protocol from modules into api/http.

Closes #455

@karmacoma karmacoma self-assigned this Mar 9, 2017
@karmacoma karmacoma changed the title extract http api from modules Cxtract http api from modules - Closes #455 Mar 9, 2017
@karmacoma karmacoma changed the title Cxtract http api from modules - Closes #455 Extract http api from modules - Closes #455 Mar 9, 2017
sanitize: function (property, schema, cb) {
return function (req, res, next) {
req.sanitize(req[property], schema, function (err, report, sanitized) {
if (err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

err is always null here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point

open: function (req, cb) {
library.schema.validate(req.body, schema.open, function (err) {
if (err) {
return setImmediate(cb, err[0].message);
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure that err[0] always exists?

@karmacoma karmacoma changed the base branch from development to 455-detach-api March 14, 2017 09:01
@karmacoma karmacoma merged commit a4c7880 into LiskArchive:455-detach-api Mar 16, 2017
@karmacoma karmacoma deleted the 455-detach-api branch March 16, 2017 15:08
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.

None yet

3 participants