fix: fixes
This commit is contained in:
parent
6141e0d1bb
commit
3746303214
|
|
@ -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)]
|
||||
):
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue