Reconciliar verificacoes com navegacao e relatorios aprovados

This commit is contained in:
2026-10-20 15:12:17 +02:00
parent 74b081e93e
commit 6e439def02
5 changed files with 42 additions and 12 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ export async function portalRequest<T>(
const headers = new Headers(options.headers);
headers.set('Accept', 'application/json');
if (options.method && !['GET', 'HEAD'].includes(options.method.toUpperCase())) {
const token = document.cookie.split('; ').find(value => value.startsWith('XSRF-TOKEN='))?.slice(11);
const token = typeof document === 'undefined' ? undefined : document.cookie.split('; ').find(value => value.startsWith('XSRF-TOKEN='))?.slice(11);
if (token) headers.set('X-XSRF-TOKEN', decodeURIComponent(token));
}
const response = await fetch(url, {