Massive backend refactoring done

This commit is contained in:
AG
2025-12-10 14:56:20 +02:00
parent 502943f7d0
commit 95a5e37748
47 changed files with 1898 additions and 1416 deletions

24
tests/debug_login.spec.ts Normal file
View File

@@ -0,0 +1,24 @@
import { test, expect } from './fixtures';
test('Debug Login Payload', async ({ page, createUniqueUser }) => {
const user = await createUniqueUser();
console.log('Created user:', user);
await page.goto('/');
// Intercept login request
await page.route('**/api/auth/login', async route => {
const request = route.request();
const postData = request.postDataJSON();
console.log('LOGIN REQUEST BODY:', JSON.stringify(postData, null, 2));
console.log('LOGIN REQUEST HEADERS:', JSON.stringify(request.headers(), null, 2));
await route.continue();
});
await page.getByLabel('Email').fill(user.email);
await page.getByLabel('Password').fill(user.password);
await page.getByRole('button', { name: 'Login' }).click();
// Wait a bit for request to happen
await page.waitForTimeout(3000);
});