Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch-#158617482 #1

Open
wants to merge 3 commits into
base: api
Choose a base branch
from
Open

ch-#158617482 #1

wants to merge 3 commits into from

Conversation

fredneutron
Copy link
Owner

#158617482- remodeling the code base to follow the proper guidelines given, so as to avoid unwanted bugs

@zeze111
Copy link

zeze111 commented Jun 26, 2018

Please fix your travis failing tests

Copy link

@zeze111 zeze111 left a comment

Choose a reason for hiding this comment

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

Please look into my various comments.

@@ -7,7 +7,7 @@ import express from 'express';
const Middleware = (app) => {
app.use(bodyParser.json());
//public the view
app.use(express.static('View'));
//app.use(express.static('View'));
Copy link

Choose a reason for hiding this comment

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

please delete commented code if you no longer need it, don't push commented code online

export default blowFish;
Copy link

Choose a reason for hiding this comment

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

why blowFish?

return encrypted += decipher.final('base64');
}
const blowFish = (text, key) => {
const decipher = crypto.createCipheriv('bf-cbc', key, 'ridewayway');
Copy link

Choose a reason for hiding this comment

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

do you mean 'ridemyway'?

});
res.json(req.body.id);
}
});
Copy link

Choose a reason for hiding this comment

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

separate your routes from your methods, have a routes file, and a controllers folder contains the methods for your routes

// delete a ride
ride.delete('/rides/:id', (req, res) => {
console.log(req.params.id);
res.json({ type: 'DELETE' });
});

Copy link

Choose a reason for hiding this comment

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

please refer to my comment concerning routes and controllers

res.send({type: 'DELETE'});
// delete a user
user.delete('/users/:id', (req, res) => {
res.json({ type: 'DELETE' });
});

Copy link

Choose a reason for hiding this comment

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

please refer to my comment concerning routes and controllers

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.

2 participants