From 584eac2dec4b2a9598e1a5ab544a7aaf6d10bc23 Mon Sep 17 00:00:00 2001
From: esantangelo <enzo020895@gmail.com>
Date: Sat, 14 Nov 2020 16:48:15 -0300
Subject: [PATCH] fix

---
 Tsi1.Api/Tsi1.Api/Controllers/SurveyController.cs        | 4 ++--
 Tsi1.Api/Tsi1.BusinessLayer/Helpers/ErrorMessages.cs     | 2 +-
 Tsi1.Api/Tsi1.BusinessLayer/Interfaces/ISurveyService.cs | 2 +-
 Tsi1.Api/Tsi1.BusinessLayer/Services/SurveyService.cs    | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Tsi1.Api/Tsi1.Api/Controllers/SurveyController.cs b/Tsi1.Api/Tsi1.Api/Controllers/SurveyController.cs
index e590885..e8e918b 100644
--- a/Tsi1.Api/Tsi1.Api/Controllers/SurveyController.cs
+++ b/Tsi1.Api/Tsi1.Api/Controllers/SurveyController.cs
@@ -64,7 +64,7 @@ namespace Tsi1.Api.Controllers
 
         [Authorize(Roles = UserTypes.FacultyAdmin + ", " + UserTypes.UdelarAdmin)]
         [HttpGet("GetAllGlobalSurvey")]
-        public async Task<IActionResult> GetAllGlobalSurvey(int tenantId)
+        public async Task<IActionResult> GetAllGlobalSurveys(int tenantId)
         {
             var userType = HttpContext.User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.Role).Value;
             if (userType == UserTypes.FacultyAdmin)
@@ -72,7 +72,7 @@ namespace Tsi1.Api.Controllers
                 tenantId = int.Parse(HttpContext.User.Claims.FirstOrDefault(x => x.Type == "TenantId").Value);
             }
            
-            var result = await _surveyService.GetAllGlobalSurvey(tenantId, userType);
+            var result = await _surveyService.GetAllGlobalSurveys(tenantId, userType);
 
             if (result.HasError)
             {
diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Helpers/ErrorMessages.cs b/Tsi1.Api/Tsi1.BusinessLayer/Helpers/ErrorMessages.cs
index f687c17..f29a7cc 100644
--- a/Tsi1.Api/Tsi1.BusinessLayer/Helpers/ErrorMessages.cs
+++ b/Tsi1.Api/Tsi1.BusinessLayer/Helpers/ErrorMessages.cs
@@ -57,7 +57,7 @@ namespace Tsi1.BusinessLayer.Helpers
 
         public const string SurveyDoesNotExist = "La encuesta con id '{0}' no existe";
         public const string SurveyIsNull = "La encuesta es nula";
-        public const string SurveyHasNotQuestions = "La encuesta no tiene preguntas";
+        public const string SurveyHasNoQuestions = "La encuesta no tiene preguntas";
         public const string InvalidSurvey = "La encuesta no pertenece a la facultad con id '{0}'";
     }
 }
diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Interfaces/ISurveyService.cs b/Tsi1.Api/Tsi1.BusinessLayer/Interfaces/ISurveyService.cs
index fe28ab4..166da72 100644
--- a/Tsi1.Api/Tsi1.BusinessLayer/Interfaces/ISurveyService.cs
+++ b/Tsi1.Api/Tsi1.BusinessLayer/Interfaces/ISurveyService.cs
@@ -11,7 +11,7 @@ namespace Tsi1.BusinessLayer.Interfaces
     {
         Task<ServiceResult<bool>> CreateGlobalSurvey(SurveyCreateDto newSurvey, int tenantId);
         Task<ServiceResult<bool>> DeleteGlobalSurvey(int surveyId, string userType, int tenantId);
-        Task<ServiceResult<List<SurveyPreviewDto>>> GetAllGlobalSurvey(int tenantId, string userType);
+        Task<ServiceResult<List<SurveyPreviewDto>>> GetAllGlobalSurveys(int tenantId, string userType);
         Task<ServiceResult<SurveyDetailDto>> GetMySurvey(int surveyId, int userId);
         Task<ServiceResult<bool>> Complete(SurveyResponseCreateDto surveyResponse);
         Task<ServiceResult<List<SurveyResponseDetailDto>>> GetAllResponses(int surveyId, string userType, int tenantId);
diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Services/SurveyService.cs b/Tsi1.Api/Tsi1.BusinessLayer/Services/SurveyService.cs
index 17c9a1c..bf0bf12 100644
--- a/Tsi1.Api/Tsi1.BusinessLayer/Services/SurveyService.cs
+++ b/Tsi1.Api/Tsi1.BusinessLayer/Services/SurveyService.cs
@@ -42,7 +42,7 @@ namespace Tsi1.BusinessLayer.Services
             if (!survey.SurveyQuestions.Any())
             {
                 result.HasError = true;
-                result.AddMessage(ErrorMessages.SurveyHasNotQuestions);
+                result.AddMessage(ErrorMessages.SurveyHasNoQuestions);
                 return result;
             }
 
@@ -83,7 +83,7 @@ namespace Tsi1.BusinessLayer.Services
             return result;
         }
 
-        public async Task<ServiceResult<List<SurveyPreviewDto>>> GetAllGlobalSurvey(int tenantId, string userType)
+        public async Task<ServiceResult<List<SurveyPreviewDto>>> GetAllGlobalSurveys(int tenantId, string userType)
         {
             var result = new ServiceResult<List<SurveyPreviewDto>>();
 
-- 
GitLab