File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 44from fastapi import FastAPI
55
66from python_template .api .dependency_container import DependencyContainer
7- from python_template .api .workflows .products import product_router
7+ from python_template .api .workflows .products . product_router import product_router
88from python_template .common .application_environment import ApplicationEnvironment
99
1010
@@ -24,4 +24,4 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None]:
2424 openapi_url = openapi_url ,
2525 lifespan = lifespan ,
2626)
27- app .include_router (product_router . router )
27+ app .include_router (product_router )
Original file line number Diff line number Diff line change 1111 PublishProductResponse ,
1212)
1313
14- router = APIRouter (
14+ product_router = APIRouter (
1515 prefix = "/api/v1/products" ,
1616 tags = ["products" ],
1717)
1818
1919
20- @router .post ("" )
20+ @product_router .post ("" )
2121async def publish_product (request : PublishProductRequest ) -> PublishProductResponse :
2222 workflow = await DependencyContainer .get_publish_product_workflow ()
2323 return await workflow .execute (request )
2424
2525
26- @router .post ("/discontinue" )
26+ @product_router .post ("/discontinue" )
2727async def discontinue_product (request : DiscontinueProductRequest ) -> None :
2828 workflow = await DependencyContainer .get_discontinue_product_workflow ()
2929 await workflow .execute (request )
You can’t perform that action at this time.
0 commit comments