refactor: convert SelectedSlotsRepository to use dependency injection pattern (#22387)
* refactor: convert TeamRepository to use dependency injection pattern - Add constructor injection for PrismaClient in TeamRepository - Convert all static methods to instance methods using this.prismaClient - Update all usage sites to use two-step pattern: const teamRepo = new TeamRepository(prisma); teamRepo.method(...) - Optimize instance reuse within same function scopes where possible - Update test files to work with new instance pattern - Preserve all existing functionality and method signatures Follows the same dependency injection pattern as UserRepository refactoring Co-Authored-By: [email protected] <[email protected]> * refactor: convert SelectedSlotsRepository to use dependency injection pattern - Add constructor injection for PrismaClient/PrismaTransaction - Convert all static methods to instance methods using this.prismaClient - Update usage sites to use two-step instantiation pattern: const slotsRepo = new SelectedSlotsRepository(prisma); slotsRepo.method(...) - Optimize instance reuse in util.ts for multiple method calls - Update test mocks to handle new constructor-based pattern - Add explicit type annotations to resolve TypeScript inference issues Follows same dependency injection pattern as UserRepository and TeamRepository refactorings. Co-Authored-By: [email protected] <[email protected]> * chore: bump platform libs * fix: devin mistake prisma client * fix: devin typing mistakes * chore: bump platform libs --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Morgan <[email protected]>
This commit is contained in:
7 files changed
+29
-26
No files matched your search
@@ -38,7 +38,7 @@
|
||||
"@axiomhq/winston": "^1.2.0",
|
||||
"@calcom/platform-constants": "*",
|
||||
"@calcom/platform-enums": "*",
|
||||
"@calcom/platform-libraries": "npm:@calcom/[email protected]3",
|
||||
"@calcom/platform-libraries": "npm:@calcom/[email protected]5",
|
||||
"@calcom/platform-types": "*",
|
||||
"@calcom/platform-utils": "*",
|
||||
"@calcom/prisma": "*",
|
||||
|
||||
Reference in new issue
Block a user