Fix for Data seed issue,Url Correction for SurveyResponses

This commit is contained in:
Santhosh S
2023-09-04 15:40:10 -04:00
parent af004ce565
commit a52f6e0cf9
30 changed files with 146 additions and 76 deletions

View File

@ -18,14 +18,14 @@ namespace DamageAssesment.Api.Surveys.Controllers
/// GET request for retrieving surveys
/// </summary>
/// <remarks>
/// This endpoint retrieves surveys. You can use it to get all surveys or surveys for a specific language.
/// This endpoint retrieves surveys. You can use it to get all surveys or surveys for a specific language(optional).
/// </remarks>
[Route("Surveys")]
[Route("{Language}/Surveys")]
[Route("{language}/Surveys")]
[HttpGet]
public async Task<ActionResult> GetSurveysAsync(string? Language)
public async Task<ActionResult> GetSurveysAsync(string? language)
{
var result = await this.surveyProvider.GetSurveysAsync(Language);
var result = await this.surveyProvider.GetSurveysAsync(language);
if (result.IsSuccess)
{
return Ok(result.Surveys);
@ -37,11 +37,11 @@ namespace DamageAssesment.Api.Surveys.Controllers
/// GET request for retrieving surveys by ID.
/// </summary>
[Route("Surveys/{Id}")]
[Route("{Language}/Surveys/{Id}")]
[Route("{language}/Surveys/{Id}")]
[HttpGet]
public async Task<ActionResult> GetSurveysAsync(int Id, string? Language)
public async Task<ActionResult> GetSurveysAsync(int Id, string? language)
{
var result = await this.surveyProvider.GetSurveysAsync(Id, Language);
var result = await this.surveyProvider.GetSurveysAsync(Id, language);
if (result.IsSuccess)
{
return Ok(result.Surveys);