diff --git a/DamageAssesmentApi/DamageAssesment.Api.Responses/Controllers/SurveyResponsesController.cs b/DamageAssesmentApi/DamageAssesment.Api.Responses/Controllers/SurveyResponsesController.cs
index 9fce5f8..871106c 100644
--- a/DamageAssesmentApi/DamageAssesment.Api.Responses/Controllers/SurveyResponsesController.cs
+++ b/DamageAssesmentApi/DamageAssesment.Api.Responses/Controllers/SurveyResponsesController.cs
@@ -218,16 +218,16 @@ namespace DamageAssesment.Api.Responses.Controllers
return NoContent();
}
///
- /// Export surveys based on role .
+ /// Export all survey response data based on survey id.
///
[HttpGet]
-
- [Route("responses/surveys/export")]
- public async Task GetExcelSurveysAsync(string language,bool IsAdmin=false)
+ [Route("responses/surveys/export/{surveyid}")]
+ public async Task GetExcelSurveysAsync(int surveyid, string language, bool IsAdmin = false)
{
- var result = await this.surveyResponseProvider.ExportSurveyResponsesAsync(language, IsAdmin);
- if (result.IsSuccess)
+ var result = await this.surveyResponseProvider.ExportSurveyResponsesAsync(surveyid, language, IsAdmin);
+ if (result.IsSuccess && result.surveyResponses.Count > 0)
{
+
byte[] fileContents = excelExportService.ExportToExcel