added logic to get active surveys from survey responses

This commit is contained in:
uppuv
2023-10-16 14:02:28 -04:00
parent c89c6f60c3
commit 8a803ad157
4 changed files with 36 additions and 23 deletions

View File

@ -18,7 +18,7 @@ namespace DamageAssesment.Api.Surveys.Providers
this.surveyDbContext = surveysDbContext;
this.logger = logger;
this.mapper = mapper;
//seedData();
// seedData();
}
// Method to seed initial data into the database
@ -93,7 +93,8 @@ namespace DamageAssesment.Api.Surveys.Providers
try
{
logger?.LogInformation("Get all Surveys from DB");
var surveys = await surveyDbContext.Surveys.Where(s => s.IsEnabled == true).ToListAsync();
//checking is enabled in survey response
var surveys = await surveyDbContext.Surveys.ToListAsync();//Where(s => s.IsEnabled == true)
if (surveys != null)
{