Opravy dle SonarLint - klient

This commit is contained in:
2026-01-13 15:35:00 +01:00
parent e03ba45415
commit c264f9921e
11 changed files with 55 additions and 80 deletions

View File

@@ -17,7 +17,7 @@ client.setConfig({
// Interceptor na vyhození toasteru při chybě
client.interceptors.response.use(async response => {
// TODO opravit - login je zatím výjimka, voláme ho "naprázdno" abychom zjistili, zda nás nepřihlásily trusted headers
if (!response.ok && response.url.indexOf("/login") == -1) {
if (!response.ok && !response.url.includes("/login")) {
const json = await response.json();
toast.error(json.error, { theme: "colored" });
}