Rewire marketplace.rs handlers to use ServiceProvider traits #28

Closed
opened 2026-02-09 22:53:52 +00:00 by mik-tf · 0 comments
Owner

Problem

marketplace.rs has ~40 direct service bypasses including:

  • 7x UserService::builder() for add_user_activity()
  • 6x SliceAssignmentService::builder() for assignment CRUD
  • 7x SliceRentalService::builder() for slice rentals
  • 11x CurrencyService::new() (utility, no trait needed)
  • Various Product::builder() (model constructors, not bypasses)

Complexity

marketplace.rs has nested pub async fn definitions inside if let blocks. These inner functions have separate scopes and need services added to their parameters. Key inner functions:

  • create_slice_assignment()
  • get_slice_assignments()
  • update_slice_assignment()
  • delete_slice_assignment()
  • deploy_slice_assignment()

Dependencies

  • Requires #26 (add_activity already in UserProfile trait)
  • Requires #27 (SliceRentalManager, SliceAssignmentManager traits)

Scope

~24 real rewirings (excluding CurrencyService and model builders)

## Problem marketplace.rs has ~40 direct service bypasses including: - 7x `UserService::builder()` for `add_user_activity()` - 6x `SliceAssignmentService::builder()` for assignment CRUD - 7x `SliceRentalService::builder()` for slice rentals - 11x `CurrencyService::new()` (utility, no trait needed) - Various `Product::builder()` (model constructors, not bypasses) ## Complexity marketplace.rs has nested `pub async fn` definitions inside `if let` blocks. These inner functions have separate scopes and need `services` added to their parameters. Key inner functions: - `create_slice_assignment()` - `get_slice_assignments()` - `update_slice_assignment()` - `delete_slice_assignment()` - `deploy_slice_assignment()` ## Dependencies - Requires #26 (add_activity already in UserProfile trait) - Requires #27 (SliceRentalManager, SliceAssignmentManager traits) ## Scope ~24 real rewirings (excluding CurrencyService and model builders)
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coopcloud_code/projectmycelium_marketplace#28
No description provided.