fix some linting errors
This commit is contained in:
parent
e20b0545d1
commit
e18a5e0941
5 changed files with 18 additions and 22 deletions
|
@ -4,15 +4,13 @@ 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 {...props} />
|
||||||
<LoginForm {...this.props} />
|
</div>
|
||||||
</div>
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
|
|
|
@ -4,15 +4,13 @@ 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 {...props} />
|
||||||
<SignupForm {...this.props} />
|
</div>
|
||||||
</div>
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
|
|
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue