From 4aba08dd8a74fe63bd5f427f191a33f42d42e8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Membr=C3=A9?= Date: Thu, 7 May 2020 16:08:07 +0200 Subject: [PATCH] Fixes #17338: When defining a category for a new technique, the files are not placed on the correct path in the git repo --- .../src/main/scala/com/normation/rudder/rest/lift/NcfApi.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/sources/rudder/rudder-rest/src/main/scala/com/normation/rudder/rest/lift/NcfApi.scala b/webapp/sources/rudder/rudder-rest/src/main/scala/com/normation/rudder/rest/lift/NcfApi.scala index a8761bcbfe7..a6b59515118 100644 --- a/webapp/sources/rudder/rudder-rest/src/main/scala/com/normation/rudder/rest/lift/NcfApi.scala +++ b/webapp/sources/rudder/rudder-rest/src/main/scala/com/normation/rudder/rest/lift/NcfApi.scala @@ -338,7 +338,7 @@ class NcfApi( def process0(version: ApiVersion, path: ApiPath, req: Req, params: DefaultParams, authzToken: AuthzToken): LiftResponse = { val response= - JObject(techniqueRepository.getAllCategories.toList.filter(_._1.name.value != "/").map(c => JField(c._1.name.value,JString(c._2.name)))) + JObject(techniqueRepository.getAllCategories.toList.filter(_._1.name.value != "/").map(c => JField(c._1.getPathFromRoot.tail.map(_.value).mkString("/"),JString(c._2.name)))) resp(Full(response), req, "Could not get generic methods metadata")("getMethods")