Update flow nodes api #70

Merged
romanskijdev merged 1 commits from fix-permissions into main 2026-07-16 10:45:12 +03:00
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ func RegisterFlowNodesRoutes(
r.Use(handlers.JWTVerifier(ipc.Config, ipc.Database.Admin, ipc.RedisClient))
// Получить дерево узлов для темы
handlers.RegisterRoute(r, http.MethodGet, "/topic/{topic_id}", s.GetFlowNodesByTopicIDHandler)
handlers.RegisterRoute(r, http.MethodGet, "/topic/{category_id}", s.GetFlowNodesByCategoryIDHandler)
// CRUD операции с узлами
handlers.RegisterRoute(r, http.MethodPost, "/", s.CreateFlowNodeHandler)
@ -34,7 +34,7 @@ func RegisterFlowNodesRoutes(
handlers.RegisterRoute(r, http.MethodDelete, "/", s.DeleteFlowNodeHandler)
// Сохранить всё дерево целиком (для UI конструктора)
handlers.RegisterRoute(r, http.MethodPost, "/topic/{topic_id}/tree", s.SaveEntireTreeHandler)
handlers.RegisterRoute(r, http.MethodPost, "/topic/{category_id}/tree", s.SaveEntireTreeHandler)
// Переместить узел (изменить порядок или родителя)
handlers.RegisterRoute(r, http.MethodPost, "/{id}/move", s.MoveFlowNodeHandler)