|
@ -24,7 +24,7 @@ export default class SignIn extends React.Component { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
componentDidMount () { |
|
|
componentDidMount () { |
|
|
fetch('//bikeshop.local/member/signin/') |
|
|
fetch('/members/signin/') |
|
|
.then((response) => { |
|
|
.then((response) => { |
|
|
return response.json() |
|
|
return response.json() |
|
|
}) |
|
|
}) |
|
@ -49,7 +49,7 @@ export default class SignIn extends React.Component { |
|
|
handleUpdate (text, dataSource) { |
|
|
handleUpdate (text, dataSource) { |
|
|
const self = this; |
|
|
const self = this; |
|
|
self.setState({searchText: text}) |
|
|
self.setState({searchText: text}) |
|
|
fetch(`//bikeshop.local/member/search/${text}/`) |
|
|
fetch(`/members/search/${text}/`) |
|
|
.then((response) => { |
|
|
.then((response) => { |
|
|
if (response.status === 200) |
|
|
if (response.status === 200) |
|
|
return response.json(); |
|
|
return response.json(); |
|
@ -74,7 +74,7 @@ export default class SignIn extends React.Component { |
|
|
const member = this.state.signOn.member; |
|
|
const member = this.state.signOn.member; |
|
|
|
|
|
|
|
|
if (!this.state.signedIn.find((signedInMember) => {return signedInMember.id === member.id})) { |
|
|
if (!this.state.signedIn.find((signedInMember) => {return signedInMember.id === member.id})) { |
|
|
fetch('//bikeshop.local/member/signin/', { |
|
|
fetch('/members/signin/', { |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
body: `id=${member.id}&purpose=${purpose}`, |
|
|
body: `id=${member.id}&purpose=${purpose}`, |
|
|
headers: { |
|
|
headers: { |
|
|