-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: api
Are you sure you want to change the base?
Conversation
Please fix your travis failing tests |
There was a problem hiding this 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')); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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); | ||
} | ||
}); |
There was a problem hiding this comment.
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' }); | ||
}); | ||
|
There was a problem hiding this comment.
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' }); | ||
}); | ||
|
There was a problem hiding this comment.
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
#158617482- remodeling the code base to follow the proper guidelines given, so as to avoid unwanted bugs