mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
Apply code review suggestions
This commit is contained in:
parent
4666da1d0b
commit
e7f595c460
@ -24,9 +24,10 @@ define(["apphost", "appSettings", "dom", "connectionManager", "loading", "layout
|
|||||||
page.querySelector("#txtManualPassword").value = "";
|
page.querySelector("#txtManualPassword").value = "";
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
||||||
if (response.status === 401 || response.status === 403) {
|
const UnauthorizedOrForbidden = [401, 403];
|
||||||
|
if (UnauthorizedOrForbidden.includes(response.status)) {
|
||||||
require(["toast"], function (toast) {
|
require(["toast"], function (toast) {
|
||||||
var messageKey = response.status === 401 ? "MessageInvalidUser" : "MessageUnauthorizedUser";
|
const messageKey = response.status === 401 ? "MessageInvalidUser" : "MessageUnauthorizedUser";
|
||||||
toast(Globalize.translate(messageKey));
|
toast(Globalize.translate(messageKey));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user