fix: migrate wildcard routes to named parameters (#16380)

Closes #16189

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Abdul Rahman
2025-12-09 09:52:32 +01:00
committed by GitHub
co-authored by Charles Bochet
parent b578ea5951
commit ae2919e564
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -122,7 +122,9 @@ export class AppModule {
.forRoutes({ path: 'metadata', method: RequestMethod.ALL });
for (const method of MIGRATED_REST_METHODS) {
consumer.apply(RestCoreMiddleware).forRoutes({ path: 'rest/*', method });
consumer
.apply(RestCoreMiddleware)
.forRoutes({ path: 'rest/*path', method });
}
}
}
@@ -29,7 +29,7 @@ import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard';
export class FileController {
constructor(private readonly fileService: FileService) {}
@Get('*')
@Get('*path')
@UseGuards(FilePathGuard, NoPermissionGuard)
async getFile(@Res() res: Response, @Req() req: Request) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any