8000 Working fixes by jlp0422 · Pull Request #108 · jlp0422/capstone · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Working fixes #108

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

Merged
merged 19 commits into from
Jun 15, 2018
2 changes: 1 addition & 1 deletion server/auth/facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const facebookCredentials = {
}

const verificationCb = (token, refreshToken, profile, done) => {

Team.findOrCreate({
where: { facebookId: profile.id },
defaults: profile.emails ? { email: profile.emails[0].value } : { email: 'NONE' }
Expand Down
9 changes: 7 additions & 2 deletions server/auth/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ const axios = require('axios');
router.post('/register', (req, res) => {
const { address, email, id, name, password } = req.body;
const { street, city, state } = address;
axios.get(`https://maps.googleapis.com/maps/api/geocode/json?address=${street},+${city},+${state}&key=${process.env.MAPS_KEY}`)
axios
.get(
`https://maps.googleapis.com/maps/api/geocode/json?address=${street},+${city},+${state}&key=${
process.env.MAPS_KEY
}`
)
.then(res => res.data.results[0].geometry.location)
.then(location => {
Bar.create({
Expand Down Expand Up @@ -39,7 +44,7 @@ router.post('/login', (req, res) => {
}
res.status(200).send({ token });
})
.catch(err => res.send({ error: err.response }));
.catch(err => res.status(404).send({ error: err.response }));
});

module.exports = router;
4 changes: 2 additions & 2 deletions src/components/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ class Home extends React.Component {
{
bar.endOfMembershipDate !== "Invalid date" && bar.endOfMembershipDate !== null ? (
!index &&
<button className='btn btn-primary' onStartGame }> Click to Start a Game </button>
<button className="btn btn-primary" onStartGame }> Click to Start a Game </button>
) : (<h3>Please <Link to='/checkout'>buy a membership!</Link></h3>)
}
</div>
</div>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class Login extends Component {
if (this.state.password === confirmPassword) {
this.setState({ passwordMatch: true })
}
else {
else {
this.setState({ passwordMatch: false })
}
}
Expand Down
0