This commit is contained in:
2024-04-11 14:25:40 +03:00
parent 7f302acdb5
commit 5c81af05d5
9 changed files with 63 additions and 17 deletions

View File

@@ -132,3 +132,4 @@ async def get_deal_by_id(
session: Annotated[AsyncSession, Depends(get_session)]
):
return await DealService(session).get_by_id(deal_id)

View File

@@ -1,4 +1,4 @@
from typing import Annotated
from typing import Annotated, Union
from fastapi import APIRouter, Depends
from sqlalchemy.ext.asyncio import AsyncSession
@@ -38,6 +38,7 @@ async def delete_product(
):
return await ProductService(session).delete(request)
@product_router.post(
'/update',
response_model=ProductUpdateResponse,
@@ -49,6 +50,7 @@ async def delete_product(
):
return await ProductService(session).update(request)
@product_router.get(
'/get',
response_model=ProductGetResponse,