Update survey response, adding EmployeeId , Location Id as int, adjust end point for ansers submission in batch

This commit is contained in:
Reginald Cherenfant Jasmin
2023-09-13 01:28:24 -04:00
parent 4cf7d9f891
commit 9109d0d793
68 changed files with 525 additions and 540 deletions

View File

@ -5,7 +5,6 @@ using Microsoft.OpenApi.Any;
namespace DamageAssesment.Api.Answers.Controllers
{
[Route("api")]
[ApiController]
public class AnswersController: ControllerBase
{
@ -49,10 +48,10 @@ namespace DamageAssesment.Api.Answers.Controllers
/// <summary>
/// Get all answers based on responseId.
/// </summary>
[HttpGet("AnswersByResponse/{ResponseId}")]
public async Task<IActionResult> GetAnswersByResponseId(int ResponseId)
[HttpGet("Answers/ByResponse/{responseid}")]
public async Task<IActionResult> GetAnswersByResponseId(int responseid)
{
var result = await this.answerProvider.GetAnswersAsync(ResponseId);
var result = await this.answerProvider.GetAnswersAsync(responseid);
if(result.IsSuccess)
{
return Ok(result.Answers);
@ -63,10 +62,10 @@ namespace DamageAssesment.Api.Answers.Controllers
/// Get all answers based on questionId.
/// </summary>
[HttpGet("AnswersByQuestion/{QuestionId}")]
public async Task<IActionResult> AnswersByQuestionId(int QuestionId)
[HttpGet("Answers/ByQuestion/{questionid}")]
public async Task<IActionResult> AnswersByQuestionId(int questionid)
{
var result = await this.answerProvider.GetAnswersByQuestionAsync(QuestionId);
var result = await this.answerProvider.GetAnswersByQuestionAsync(questionid);
if (result.IsSuccess)
{
return Ok(result.Answers);