fix some linting errors

This commit is contained in:
catarak 2016-06-24 18:18:22 -04:00
parent e20b0545d1
commit e18a5e0941
5 changed files with 18 additions and 22 deletions

View file

@ -4,16 +4,14 @@ import { reduxForm } from 'redux-form';
import * as UserActions from '../actions'; import * as UserActions from '../actions';
import LoginForm from '../components/LoginForm'; import LoginForm from '../components/LoginForm';
class LoginView extends React.Component { function LoginView(props) {
render() {
return ( return (
<div className="login"> <div className="login">
<h1>Login</h1> <h1>Login</h1>
<LoginForm {...this.props} /> <LoginForm {...props} />
</div> </div>
); );
} }
}
function mapStateToProps(state) { function mapStateToProps(state) {
return { return {

View file

@ -4,16 +4,14 @@ import * as UserActions from '../actions';
import { reduxForm } from 'redux-form'; import { reduxForm } from 'redux-form';
import SignupForm from '../components/SignupForm'; import SignupForm from '../components/SignupForm';
class SignupView extends React.Component { function SignupView(props) {
render() {
return ( return (
<div className="signup"> <div className="signup">
<h1>Sign Up</h1> <h1>Sign Up</h1>
<SignupForm {...this.props} /> <SignupForm {...props} />
</div> </div>
); );
} }
}
function mapStateToProps(state) { function mapStateToProps(state) {
return { return {

View file

@ -32,6 +32,7 @@ userSchema.pre('save', function (next) {
* Helper method for validating user's password. * Helper method for validating user's password.
*/ */
userSchema.methods.comparePassword = function (candidatePassword, cb) { userSchema.methods.comparePassword = function (candidatePassword, cb) {
// userSchema.methods.comparePassword = (candidatePassword, cb) => {
bcrypt.compare(candidatePassword, this.password, (err, isMatch) => { bcrypt.compare(candidatePassword, this.password, (err, isMatch) => {
cb(err, isMatch); cb(err, isMatch);
}); });

View file

@ -58,8 +58,7 @@ app.use('/api', projects);
app.use('/', serverRoutes); app.use('/', serverRoutes);
// configure passport // configure passport
// const passportConfig = require('./config/passport'); const passportConfig = require('./config/passport');
require('./config/passport');
// Connect to MongoDB // Connect to MongoDB
// mongoose.connect(process.env.MONGODB_URI || process.env.MONGOLAB_URI); // mongoose.connect(process.env.MONGODB_URI || process.env.MONGOLAB_URI);