Skip to content
Snippets Groups Projects

Password fix

Merged H9031 requested to merge password-fix into development
1 file
+ 6
9
Compare changes
  • Side-by-side
  • Inline
@@ -29,22 +29,19 @@ export default class GameView extends React.Component {
.then(res => {
if (!res.ok) {
throw Error();
} else {
return res.json();
}
})
.catch(error => {
alert("Game not found");
window.document.location.href = "/";
});
// Get game info
fetch(`${process.env.REACT_APP_API_URL}/game/${gameId}`)
.then(res => res.json())
.then(res => {
this.setState({
gameInfo: res
});
})
.catch(error => console.log(error));
.catch(error => {
alert("Game not found");
window.document.location.href = "/";
});
// Get Role
fetch(`${process.env.REACT_APP_API_URL}/faction/check-faction/${gameId}`, {
Loading