fix: fixes

This commit is contained in:
itqop 2025-10-16 23:49:53 +03:00
parent 6141e0d1bb
commit 3746303214
4 changed files with 6 additions and 6 deletions

View File

@ -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)]
):

View File

@ -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)

View File

@ -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):

View File

@ -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)