19 lines
427 B
Python
19 lines
427 B
Python
from fastapi import APIRouter
|
|
|
|
from backend.dependecies import SessionDependency
|
|
from schemas.module import GetAllModulesResponse
|
|
from services.module import ModuleService
|
|
|
|
router = APIRouter(tags=["modules"])
|
|
|
|
|
|
@router.get(
|
|
"/built-in/",
|
|
response_model=GetAllModulesResponse,
|
|
operation_id="get_modules",
|
|
)
|
|
async def get_modules(
|
|
session: SessionDependency,
|
|
):
|
|
return await ModuleService(session).get_all()
|