Opravy dle SonarLint - klient
This commit is contained in:
@@ -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" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user