forked from MDCPS/DamageAssessment_Backend
Multi Language support
This commit is contained in:
@ -15,20 +15,16 @@ namespace DamageAssesment.Api.Questions.Controllers
|
||||
this.questionsProvider = questionsProvider;
|
||||
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
/// <summary>
|
||||
/// GET request for retrieving questions.
|
||||
/// </summary>
|
||||
|
||||
// get all questions
|
||||
[Route("{Language}/Questions")]
|
||||
[Route("Questions")]
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> GetQuestionsAsync(string? Language)
|
||||
=======
|
||||
/// <summary>
|
||||
/// GET request for retrieving questions.
|
||||
/// </summary>
|
||||
|
||||
[HttpGet("Questions")]
|
||||
public async Task<IActionResult> GetQuestionsAsync()
|
||||
>>>>>>> cf3a04891b7b50d0a02ac9c8b9a78ccb9436c35c
|
||||
{
|
||||
var result = await this.questionsProvider.GetQuestionsAsync(Language);
|
||||
if (result.IsSuccess)
|
||||
@ -37,20 +33,15 @@ namespace DamageAssesment.Api.Questions.Controllers
|
||||
}
|
||||
return NoContent();
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
//Get questions based on question id
|
||||
/// <summary>
|
||||
/// GET request for retrieving a question by ID.
|
||||
/// </summary>
|
||||
[Route("{Language}/Questions/{id}")]
|
||||
[Route("Questions/{id}")]
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> GetQuestionAsync(int id, string? Language)
|
||||
=======
|
||||
/// <summary>
|
||||
/// GET request for retrieving a question by ID.
|
||||
/// </summary>
|
||||
|
||||
[HttpGet("Questions/{id}")]
|
||||
public async Task<IActionResult> GetQuestionAsync(int id)
|
||||
>>>>>>> cf3a04891b7b50d0a02ac9c8b9a78ccb9436c35c
|
||||
{
|
||||
var result = await this.questionsProvider.GetQuestionAsync(id,Language);
|
||||
if (result.IsSuccess)
|
||||
@ -59,19 +50,15 @@ namespace DamageAssesment.Api.Questions.Controllers
|
||||
}
|
||||
return NotFound();
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
//get all questions based on survey id
|
||||
[Route("{Language}/GetSurveyQuestions/{surveyId}")]
|
||||
[Route("GetSurveyQuestions/{surveyId}")]
|
||||
[HttpGet]
|
||||
=======
|
||||
/// <summary>
|
||||
/// GET request for retrieving survey questions based on a survey ID.
|
||||
/// Uri: {Optional language}/GetSurveyQuestions/{surveyId} :Default returns question in all languages
|
||||
/// </summary>
|
||||
|
||||
[HttpGet("GetSurveyQuestions/{surveyId}")]
|
||||
>>>>>>> cf3a04891b7b50d0a02ac9c8b9a78ccb9436c35c
|
||||
[Route("{Language}/GetSurveyQuestions/{surveyId}")]
|
||||
[Route("GetSurveyQuestions/{surveyId}")]
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> GetSurveyQuestions(int surveyId,string? Language)
|
||||
{
|
||||
var result = await this.questionsProvider.GetSurveyQuestionAsync(surveyId, Language);
|
||||
@ -135,7 +122,6 @@ namespace DamageAssesment.Api.Questions.Controllers
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GET request for retrieving question categories.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user