fix: migrate wildcard routes to named parameters (#16380)
Closes #16189 Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
co-authored by
Charles Bochet
parent
b578ea5951
commit
ae2919e564
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user