mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-03-04 01:38:41 +08:00
reload in case of undefined response
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
ec1f5aa129
commit
1dee9c465c
1 changed files with 6 additions and 5 deletions
|
@ -19,12 +19,13 @@
|
||||||
const xhr = e.target;
|
const xhr = e.target;
|
||||||
if (xhr.status === 201) {
|
if (xhr.status === 201) {
|
||||||
window.location.replace(xhr.getResponseHeader('Location'));
|
window.location.replace(xhr.getResponseHeader('Location'));
|
||||||
}
|
} else if (xhr.status === 422) {
|
||||||
if (xhr.status === 422) {
|
|
||||||
showError(xhr.response);
|
showError(xhr.response);
|
||||||
}
|
} else if (xhr.status === 500) {
|
||||||
if (xhr.status === 500) {
|
showError("Server error. Please check the mastercontainer logs for details.");
|
||||||
showError("Server error. Please see the 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