Skip to content
Snippets Groups Projects
Commit 0ddf4d5e authored by M3034's avatar M3034
Browse files

Merge branch 'password-fix' into 'development'

Password fix

See merge request !35
parents 8e12ebd6 8a1a4dab
No related branches found
No related tags found
2 merge requests!46Development to testing,!35Password fix
......@@ -532,6 +532,7 @@ export default class EditGameForm extends React.Component {
minLength="3"
onChange={this.handleChange}
placeholder="Faction password"
type="password"
form="factionAddFrom"
/>
<div
......
......@@ -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}`, {
......
......@@ -117,6 +117,7 @@ export default class JoinGameForm extends React.Component {
onChange={e =>
this.setState({ factionPasswordInput: e.target.value })
}
type="password"
placeholder="Password"
minLength="3"
required
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment