20 lines
487 B
Python
20 lines
487 B
Python
from fastapi import APIRouter, Depends
|
|
from sqlalchemy.orm import Session
|
|
|
|
from app.db import get_db
|
|
from app.models.home import public_edu_platforms
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/edu/platforms")
|
|
def read_edu_platforms(db: Session = Depends(get_db)) -> dict:
|
|
return public_edu_platforms(db)
|
|
|
|
|
|
@router.get("/edu/association")
|
|
def read_association(db: Session = Depends(get_db)) -> dict:
|
|
from app.services.association_education import read_links
|
|
|
|
return read_links(db)
|