From 18b35ae3a5d132dfc05aa555a8478d71938cf5ab Mon Sep 17 00:00:00 2001 From: "Johnny.Ratton" Date: Wed, 3 Apr 2024 10:58:25 +0200 Subject: [PATCH] =?UTF-8?q?Controller=20modifi=C3=A9=20mais=20bug=20avec?= =?UTF-8?q?=20test=20unitaires=20en=20local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API_SQLuedo/API/Controllers/QueryController.cs | 6 +++--- API_SQLuedo/API/Service/QueryDataServiceApi.cs | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/API_SQLuedo/API/Controllers/QueryController.cs b/API_SQLuedo/API/Controllers/QueryController.cs index e0fdb81..0a8c1c4 100644 --- a/API_SQLuedo/API/Controllers/QueryController.cs +++ b/API_SQLuedo/API/Controllers/QueryController.cs @@ -26,7 +26,7 @@ namespace API.Controllers } logger.LogInformation("[INFORMATION] La requête a renvoyé : {result} ", queryResult); - return Ok(queryResult); + return Content(queryResult.Result, "application/json"); } [HttpGet("{database}/Tables")] @@ -42,7 +42,7 @@ namespace API.Controllers } logger.LogInformation("[INFORMATION] La requête a renvoyé : {result} ", queryResult); - return Ok(queryResult); + return Content(queryResult.Result, "application/json"); } @@ -59,7 +59,7 @@ namespace API.Controllers } logger.LogInformation("[INFORMATION] La requête a renvoyé : {result} ", queryResult); - return Ok(queryResult); + return Content(queryResult.Result, "application/json"); } } } diff --git a/API_SQLuedo/API/Service/QueryDataServiceApi.cs b/API_SQLuedo/API/Service/QueryDataServiceApi.cs index f4bff6d..d0a7883 100644 --- a/API_SQLuedo/API/Service/QueryDataServiceApi.cs +++ b/API_SQLuedo/API/Service/QueryDataServiceApi.cs @@ -56,7 +56,6 @@ public class QueryDataServiceApi : IQueryService{ resultList.Add(row); } - string resultJson = JsonConvert.SerializeObject(resultList); QueryDto queryDto = new QueryDto { Result = resultJson };