|
@@ -1,15 +1,15 @@
|
|
|
-from fastapi import APIRouter
|
|
|
+from fastapi import APIRouter, Request
|
|
|
from loguru import logger
|
|
|
|
|
|
from app.controllers.algorithms.graph_coloring import get_graph_coloring
|
|
|
from app.controllers.algorithms.meeting_attendee_recommendation import (
|
|
|
build_recommendations,
|
|
|
)
|
|
|
-from app.models.domain.algorithms import GraphColoringRequest, GraphColoringResponse
|
|
|
from app.models.domain.algorithms import (
|
|
|
AttendeesRecommendationRequest,
|
|
|
AttendeesRecommendationResponse,
|
|
|
)
|
|
|
+from app.models.domain.algorithms import GraphColoringRequest, GraphColoringResponse
|
|
|
|
|
|
router = APIRouter()
|
|
|
|
|
@@ -19,6 +19,11 @@ async def get_living_condition():
|
|
|
return {"message": "alive"}
|
|
|
|
|
|
|
|
|
+@router.get("/app")
|
|
|
+def read_main(request: Request):
|
|
|
+ return {"message": "Hello World", "root_path": request.scope.get("root_path")}
|
|
|
+
|
|
|
+
|
|
|
@router.post("/graph-coloring", response_model=GraphColoringResponse)
|
|
|
async def get_graph_coloring_result(graph: GraphColoringRequest):
|
|
|
is_solvable, colored = await get_graph_coloring(graph.graph)
|