fix: complete InvesteMoz validation and error corrections

This commit is contained in:
2026-10-29 21:47:33 +02:00
parent 63147312e2
commit daf8623441
718 changed files with 127308 additions and 20959 deletions
+11 -2
View File
@@ -114,8 +114,17 @@ export async function portalRequest<T>(
): Promise<T> {
const headers = new Headers(options.headers);
headers.set('Accept', 'application/json');
if (options.method && !['GET', 'HEAD'].includes(options.method.toUpperCase())) {
const token = typeof document === 'undefined' ? undefined : document.cookie.split('; ').find(value => value.startsWith('XSRF-TOKEN='))?.slice(11);
if (
options.method &&
!['GET', 'HEAD'].includes(options.method.toUpperCase())
) {
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, {