Skip to content

Commit

Permalink
fix: crud and routers
Browse files Browse the repository at this point in the history
  • Loading branch information
haxgun committed Dec 5, 2024
1 parent 28fe603 commit e24a462
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/app/api/v1/endpoints/overlay.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from fastapi import APIRouter, Depends
from sqlmodel.ext.asyncio.session import AsyncSession

from app.crud import overlay
from app import crud
from app.db.session import get_db
from app.schemas.overlay import OverlaySchema, OverlayCreate

Expand All @@ -10,14 +10,14 @@

@router.get("/", response_model=list[OverlaySchema])
async def get_overlays(session: AsyncSession = Depends(get_db)):
return await overlay.get_overlays(session)
return await crud.get_overlays(session)


@router.get("/{overlay_id}", response_model=OverlaySchema)
async def get_overlay(overlay_id: str, session: AsyncSession = Depends(get_db)):
return await overlay.get_overlay(overlay_id, session)
return await crud.get_overlay(overlay_id, session)


@router.post("/", response_model=OverlaySchema)
async def add_overlay(overlay: OverlayCreate, session: AsyncSession = Depends(get_db)):
return await overlay.add_overlay(overlay, session)
return await crud.add_overlay.add_overlay(overlay, session)

0 comments on commit e24a462

Please sign in to comment.