created design pattern
This commit is contained in:
22
ApiServices/BuildingService/Endpoints/routes.py
Normal file
22
ApiServices/BuildingService/Endpoints/routes.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
|
||||
def get_routes() -> list[APIRouter]:
|
||||
from .building.route import building_route
|
||||
from .area.route import area_route
|
||||
from .sites.route import sites_route
|
||||
from .parts.route import parts_route
|
||||
from .spaces.route import spaces_route
|
||||
from .type.route import build_types_route
|
||||
|
||||
return [building_route, area_route, sites_route, parts_route, spaces_route, build_types_route]
|
||||
|
||||
|
||||
def get_safe_endpoint_urls() -> list[tuple[str, str]]:
|
||||
return [
|
||||
("/", "GET"),
|
||||
("/docs", "GET"),
|
||||
("/redoc", "GET"),
|
||||
("/openapi.json", "GET"),
|
||||
("/metrics", "GET"),
|
||||
]
|
||||
Reference in New Issue
Block a user