Files
orion/app
Samir Boulahtit 5d40551d98 refactor: fix architecture violations in admin marketplace endpoint
Move database queries to service layer and use proper Pydantic responses:

Schema changes (models/schema/marketplace_import_job.py):
- Add AdminMarketplaceImportJobResponse with extra fields (id, error_details,
  created_by_name)
- Add AdminMarketplaceImportJobListResponse with items/total/page/limit format

Service changes (app/services/marketplace_import_job_service.py):
- Add convert_to_admin_response_model() for admin-specific response
- Add get_all_import_jobs_paginated() for admin listing
- Add get_import_job_by_id_admin() without access control

API changes (app/api/v1/admin/marketplace.py):
- Use service methods instead of direct DB queries
- Use proper Pydantic response models instead of dicts
- All business logic now in service layer

Cleanup:
- Remove duplicate methods from admin_service.py

Architecture validation now passes with 0 violations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 22:14:25 +01:00
..