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 };