feat: Refactor Filament resources and fix tenant admin login

This commit is contained in:
2025-09-09 21:21:47 +02:00
parent 04ac85107c
commit 9da6803eaa
29 changed files with 627 additions and 459 deletions

View File

@@ -1,7 +1,11 @@
export async function login(email: string, password: string): Promise<{ token: string }> {
const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute('content');
const res = await fetch('/api/v1/tenant/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
headers: {
'Content-Type': 'application/json',
'X-CSRF-TOKEN': csrfToken || '',
},
body: JSON.stringify({ email, password }),
});
if (!res.ok) throw new Error('Login failed');