diff --git a/Tsi1.Api/Tsi1.Api/Controllers/SurveyController.cs b/Tsi1.Api/Tsi1.Api/Controllers/SurveyController.cs index e59088550ccfe4060986b9498c034d81cfe400be..e8e918b0260c1be11b0502aed9f77d934ae056c0 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 f687c170523fa2c0bfe1872a761b81a20d2599be..f29a7cc62a9beabd276205bf36b38976d6b2d2fa 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 fe28ab4bd9f3a39b78d275d4940820c6abb04994..166da72495011ee0b30a6ccaee67e8f108288c3b 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 17c9a1cc0bbb60111929f7d8cfd9acf91848a106..bf0bf120ddf61bfbb131f476d8cedee7111c2914 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>>();