Split graph/import/meta into Django apps, add API v1 with OpenAPI and pytest, and introduce plugin registry with the tags reference plugin on both FE and BE. Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
397 B
Python
16 lines
397 B
Python
from rest_framework.decorators import api_view
|
|
from rest_framework.response import Response
|
|
|
|
from .services import build_full_graph, build_network_map_graph
|
|
|
|
|
|
@api_view(['GET'])
|
|
def graph_data(request):
|
|
return Response(build_full_graph())
|
|
|
|
|
|
@api_view(['GET'])
|
|
def network_map_graph(request):
|
|
map_id = request.query_params.get('map_id')
|
|
return Response(build_network_map_graph(map_id))
|