fix(admin): an invite for a trip that does not exist answers 404 instead of an empty 201

createInvite returned { error: 'Trip not found', status: 404 } and the admin controller never looked at it: POST /api/admin/invites with an unknown trip_id answered 201 with an empty body and wrote an admin.invite_create audit row for resource 'undefined'. The service throws the DomainError now, so the route answers 404 { error: 'Trip not found' } and writes neither the invite nor the audit row.
This commit is contained in:
Maurice
2026-10-10 19:52:57 +02:00
parent 8fb888c8a3
commit 8187a423e2
5 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
"no-misleading-character-class": 1
},
"tests": {
"@typescript-eslint/no-explicit-any": 1569,
"@typescript-eslint/no-explicit-any": 1567,
"@typescript-eslint/no-non-null-assertion": 1757,
"@typescript-eslint/no-require-imports": 25,
"@typescript-eslint/no-unsafe-function-type": 7,
@@ -4,7 +4,6 @@
"src/nest/auth/auth.service.ts": 5,
"src/nest/auth/passkey.controller.ts": 1,
"src/nest/auth/passkey.service.ts": 2,
"src/nest/auth/registration-invites.service.ts": 1,
"src/nest/backup/backup-archive.ts": 8,
"src/nest/backup/backup.impl.ts": 1,
"src/nest/collab/collab.controller.ts": 7,