package routes import ( "bugulma/backend/internal/handler" "github.com/gin-gonic/gin" ) // RegisterGraphRoutes registers all graph-related routes func RegisterGraphRoutes(public *gin.RouterGroup, protected *gin.RouterGroup, graphHandler *handler.GraphHandler, graphTraversalHandler *handler.GraphTraversalHandler) { // Public read-only routes if graphHandler != nil { graph := public.Group("/graph") { graph.GET("/organizations/:organizationId/network", graphHandler.GetOrganizationNetwork) graph.GET("/shortest-path", graphHandler.FindShortestPath) graph.GET("/spatial-proximity", graphHandler.GetSpatialProximity) graph.GET("/matching-opportunities", graphHandler.GetMatchingOpportunities) graph.GET("/statistics", graphHandler.GetGraphStatistics) } } // Protected write routes if graphHandler != nil { graphAdmin := protected.Group("/graph") { graphAdmin.POST("/sync", graphHandler.SyncGraphDatabase) } } }