Accept both v1 and v2 spec for editcharacterattributes endpoint

This commit is contained in:
artisticMink
2023-11-05 16:44:31 +01:00
parent 42d838a0b3
commit c584da2ea9
3 changed files with 6 additions and 4 deletions

View File

@ -81,7 +81,7 @@ class CharacterContextMenu {
body: JSON.stringify(data),
}).then((response) => {
if (response.ok) toggleFavoriteHighlight(characterId)
else toastr.error('Character not saved. Error: ' + response.json()?.message)
else response.json().then(json => toastr.error('Character not saved. Error: ' + json.message + '. Field: ' + json.error));
});
}