diff --git a/src/hubgw/api/v1/warps.py b/src/hubgw/api/v1/warps.py index 36c6012..7115ead 100644 --- a/src/hubgw/api/v1/warps.py +++ b/src/hubgw/api/v1/warps.py @@ -7,7 +7,7 @@ from hubgw.api.deps import get_warps_service, verify_api_key from hubgw.services.warps_service import WarpsService from hubgw.schemas.warps import ( WarpCreateRequest, WarpUpdateRequest, WarpDeleteRequest, WarpGetRequest, - Warp, WarpGetResponse, WarpListQuery, WarpListResponse + Warp, WarpGetResponse, WarpQuery, WarpListResponse ) from hubgw.core.errors import AppError, create_http_exception @@ -68,7 +68,7 @@ async def get_warp( @router.post("/list", response_model=WarpListResponse) async def list_warps( - query: WarpListQuery, + query: WarpQuery, service: Annotated[WarpsService, Depends(get_warps_service)], _: Annotated[str, Depends(verify_api_key)] ): diff --git a/src/hubgw/models/cooldown.py b/src/hubgw/models/cooldown.py index 371fb16..80637d8 100644 --- a/src/hubgw/models/cooldown.py +++ b/src/hubgw/models/cooldown.py @@ -18,4 +18,4 @@ class Cooldown(Base): cooldown_type = Column(String(50), nullable=False) expires_at = Column(DateTime(timezone=True), nullable=False, index=True) cooldown_seconds = Column(Integer, nullable=False) - metadata = Column(JSONB) + data = Column(JSONB) diff --git a/src/hubgw/schemas/cooldowns.py b/src/hubgw/schemas/cooldowns.py index 5e2d0a6..b591987 100644 --- a/src/hubgw/schemas/cooldowns.py +++ b/src/hubgw/schemas/cooldowns.py @@ -28,7 +28,7 @@ class CooldownBase(BaseModel): cooldown_type: str expires_at: datetime cooldown_seconds: int - metadata: Optional[dict] = None + data: Optional[dict] = None class CooldownCreate(CooldownBase): diff --git a/src/hubgw/services/warps_service.py b/src/hubgw/services/warps_service.py index e680519..7cae397 100644 --- a/src/hubgw/services/warps_service.py +++ b/src/hubgw/services/warps_service.py @@ -6,7 +6,7 @@ from typing import List from hubgw.repositories.warps_repo import WarpsRepository from hubgw.schemas.warps import ( WarpCreateRequest, WarpUpdateRequest, WarpDeleteRequest, WarpGetRequest, - Warp, WarpGetResponse, WarpListQuery, WarpListResponse + Warp, WarpGetResponse, WarpQuery, WarpListResponse ) from hubgw.core.errors import NotFoundError, AlreadyExistsError @@ -61,7 +61,7 @@ class WarpsService: updated_at=warp.updated_at ) - async def list_warps(self, query: WarpListQuery) -> WarpListResponse: + async def list_warps(self, query: WarpQuery) -> WarpListResponse: """List warps with business logic.""" warps, total = await self.repo.list(query)