feat: Landing Page and Login/Register Modal

This commit is contained in:
OpenVelo Agent
2026-07-21 18:34:42 +00:00
parent 09856ccf8e
commit 0126f6ad39
37 changed files with 1791 additions and 210 deletions
+5
View File
@@ -33,7 +33,12 @@ beforeAll(async () => {
.send({ username: 'admin', password: 'Sup3rSecret!Pass' })
.expect(201);
const csrfPrime = await request(server).get('/api/v1/auth/csrf');
const csrfCookie = (csrfPrime.headers['set-cookie'] as unknown as string[] | undefined)?.find((c) => c.startsWith('csrf='));
const csrfToken = csrfCookie ? decodeURIComponent(csrfCookie.split(';')[0].split('=')[1]) : '';
const login = await request(server).post('/api/v1/auth/login')
.set('Cookie', `csrf=${csrfToken}`)
.set('X-CSRF-Token', csrfToken)
.send({ username: 'admin', password: 'Sup3rSecret!Pass' })
.expect(201);
adminToken = login.body.accessToken;