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 LoginForm from '../components/LoginForm';
class LoginView extends React.Component {
render() {
function LoginView(props) {
return (
<div className="login">
<h1>Login</h1>
<LoginForm {...this.props} />
<LoginForm {...props} />
</div>
);
}
}
function mapStateToProps(state) {
return {

View file

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

View file

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

View file

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