Save hashed PW. Simplify model update. Bugfixes & improvements. Working user-settings & games.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
const submitButton = addPlayerModal.querySelector('button[name="submit"]');
|
||||
const playerName = addPlayerModal.querySelector('#playerName');
|
||||
const clanName = addPlayerModal.querySelector('#playerClanName');
|
||||
const errorDiv = editPlayerModal.querySelector('.error-message');
|
||||
const errorDiv = addPlayerModal.querySelector('.error-message');
|
||||
const homeClanListIndex = document.getElementById('home-clan').selectedIndex;
|
||||
const oppClanListIndex = document.getElementById('opponent-clan').selectedIndex;
|
||||
|
||||
@@ -67,6 +67,12 @@
|
||||
"Content-type": "application/json; charset=UTF-8"
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Hinzufügen fehlgeschlagen!\nSpielername existiert möglichweise bereits.');
|
||||
}
|
||||
return response.text();
|
||||
})
|
||||
.then(() => {
|
||||
const sameClan = homeClanListIndex === oppClanListIndex;
|
||||
if (playerList.id === 'home-player-list' || sameClan)
|
||||
|
||||
Reference in New Issue
Block a user