Skip to content

Commit

Permalink
All endpoints are working well and connected to the DB
Browse files Browse the repository at this point in the history
  • Loading branch information
dhafer94 committed Jan 3, 2022
1 parent 1db2983 commit df9590a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Components/Register/Register.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Register extends React.Component {
this.setState({ password: evt.target.value });
};

onSubmitSignIn = () => {
onRegister = () => {
fetch('http://localhost:3001/register', {
method: 'post',
headers: { 'content-Type': 'application/json' },
Expand Down Expand Up @@ -89,7 +89,7 @@ class Register extends React.Component {
className='b ph3 pv2 input-reset ba b--black bg-transparent grow pointer f6 dib'
type='submit'
value='Sign in'
onClick={this.onSubmitSignIn}
onClick={this.onRegister}
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Signin/Signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Signin extends React.Component {
password: this.state.signInPassword,
})
})
.then(res => res.json())
.then(response => response.json())
.then(user => {
if (user.id) {
this.props.loadUser(user);
Expand Down

0 comments on commit df9590a

Please sign in to comment.