mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-12-29 10:10:55 +08:00
Merge pull request #1539 from nextcloud/enh/noid/reload-always
reload in case of undefined response
This commit is contained in:
commit
605f8c87fb
1 changed files with 6 additions and 5 deletions
|
@ -19,12 +19,13 @@
|
|||
const xhr = e.target;
|
||||
if (xhr.status === 201) {
|
||||
window.location.replace(xhr.getResponseHeader('Location'));
|
||||
}
|
||||
if (xhr.status === 422) {
|
||||
} else if (xhr.status === 422) {
|
||||
showError(xhr.response);
|
||||
}
|
||||
if (xhr.status === 500) {
|
||||
showError("Server error. Please see the logs for details.");
|
||||
} else if (xhr.status === 500) {
|
||||
showError("Server error. Please check the mastercontainer logs for details.");
|
||||
} else {
|
||||
// If the responose is not one of the above, we should reload to show the latest content
|
||||
window.location.reload(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue