fix(api): use PrismaClientKnownRequestError instanceof, add ConflictException for duplicate routes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,8 +11,8 @@ export class RoutesController {
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Body() body: { sourceGroupId?: string; targetGroupId?: string }) {
|
||||
return this.routesService.create(body.sourceGroupId ?? '', body.targetGroupId ?? '');
|
||||
create(@Body() body: { sourceGroupId: string; targetGroupId: string }) {
|
||||
return this.routesService.create(body.sourceGroupId, body.targetGroupId);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
|
||||
Reference in New Issue
Block a user