Phase 0.1: Remove backend deprecated code

- Delete routes: counter.py, sum.py
- Delete jobs.py and worker.py
- Delete tests: test_counter.py, test_jobs.py
- Update audit.py: keep only price-history endpoints
- Update models.py: remove VIEW_COUNTER, INCREMENT_COUNTER, USE_SUM permissions
- Update models.py: remove Counter, SumRecord, CounterRecord, RandomNumberOutcome models
- Update schemas.py: remove sum/counter related schemas
- Update main.py: remove deleted router imports
- Update test_permissions.py: remove tests for deprecated features
- Update test_price_history.py: remove worker-related tests
- Update conftest.py: remove mock_enqueue_job fixture
- Update auth.py: fix example in docstring
This commit is contained in:
counterweight 2025-12-22 18:07:14 +01:00
parent ea85198171
commit 5bad1e7e17
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
14 changed files with 35 additions and 1393 deletions

View file

@ -37,42 +37,6 @@ class RegisterWithInvite(BaseModel):
invite_identifier: str
class SumRequest(BaseModel):
"""Request model for sum calculation."""
a: float
b: float
class SumResponse(BaseModel):
"""Response model for sum calculation."""
a: float
b: float
result: float
class CounterRecordResponse(BaseModel):
"""Response model for a counter audit record."""
id: int
user_email: str
value_before: int
value_after: int
created_at: datetime
class SumRecordResponse(BaseModel):
"""Response model for a sum audit record."""
id: int
user_email: str
a: float
b: float
result: float
created_at: datetime
RecordT = TypeVar("RecordT", bound=BaseModel)
@ -86,10 +50,6 @@ class PaginatedResponse(BaseModel, Generic[RecordT]):
total_pages: int
PaginatedCounterRecords = PaginatedResponse[CounterRecordResponse]
PaginatedSumRecords = PaginatedResponse[SumRecordResponse]
class ProfileResponse(BaseModel):
"""Response model for profile data."""
@ -258,24 +218,6 @@ class AppointmentResponse(BaseModel):
PaginatedAppointments = PaginatedResponse[AppointmentResponse]
# =============================================================================
# Random Number Job Schemas
# =============================================================================
class RandomNumberOutcomeResponse(BaseModel):
"""Response model for a random number job outcome."""
id: int
job_id: int
triggered_by_user_id: int
triggered_by_email: str
value: int
duration_ms: int
status: str
created_at: datetime
# =============================================================================
# Price History Schemas
# =============================================================================