The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix: migrate wildcard routes to named parameters (#16380)
Abdul Rahmanae2919e56468
diff --git a/packages/twenty-server/src/app.module.ts b/packages/twenty-server/src/app.module.tsindex 64e8c7fc3ff..849d8da49e6 100644--- a/packages/twenty-server/src/app.module.ts+++ b/packages/twenty-server/src/app.module.ts@@ -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 });}}}diff --git a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.tsindex 703fe4e6736..e4a1c14f8aa 100644--- a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts+++ b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts@@ -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