feat: introduced plans pricing
This commit is contained in:
19
routes/plans.py
Normal file
19
routes/plans.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from db.session import get_db
|
||||
from repositories.addons import AddonsRepository
|
||||
from repositories.pricing import PricingRepository
|
||||
from schemas.plans import PricingPlans
|
||||
from services.plans import get_pricing_model
|
||||
|
||||
router = APIRouter(prefix="/plans")
|
||||
|
||||
|
||||
@router.get("/", response_model=PricingPlans)
|
||||
async def get_plans(session: AsyncSession = Depends(get_db)):
|
||||
addons_repo = AddonsRepository(session)
|
||||
pricing_repo = PricingRepository(session)
|
||||
|
||||
res = await get_pricing_model(addons_repo, pricing_repo)
|
||||
return res
|
||||
Reference in New Issue
Block a user