Fix deletion methods to directly use ID in services
Updated QuestionService and SurveyService to pass the ID directly to the repository's DeleteAsync method. This improves clarity and ensures consistency in how deletions are handled across both services. Updated SurveyLib
This commit is contained in:
parent
fe74490440
commit
658e25dd57
3 changed files with 3 additions and 3 deletions
|
|
@ -43,7 +43,7 @@ public class SurveyService : ISurveyService
|
|||
throw new UnauthorizedException("You are not authorized to delete this survey.");
|
||||
}
|
||||
|
||||
await _surveyRepository.DeleteAsync(survey);
|
||||
await _surveyRepository.DeleteAsync(id);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Survey>> GetSurveysAsync()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue