From a50bc30f88c5e7ed52be5521eb1e0ef1b8baca1e Mon Sep 17 00:00:00 2001 From: shept Date: Sun, 27 Apr 2025 16:07:10 +0500 Subject: [PATCH] minor services fix --- .../SurveyBackend.Services/Services/SurveyService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SurveyBackend/SurveyBackend.Services/Services/SurveyService.cs b/SurveyBackend/SurveyBackend.Services/Services/SurveyService.cs index 9911697..fbdc2e7 100644 --- a/SurveyBackend/SurveyBackend.Services/Services/SurveyService.cs +++ b/SurveyBackend/SurveyBackend.Services/Services/SurveyService.cs @@ -26,7 +26,7 @@ public class SurveyService : ISurveyService public async Task UpdateSurveyAsync(Survey survey) { if (survey.CreatedBy != _userContext.UserId) - throw new UnauthorizedAccessException("You are not authorized to update this survey."); + throw new UnauthorizedException("You are not authorized to update this survey."); await _surveyRepository.UpdateAsync(survey); } @@ -40,7 +40,7 @@ public class SurveyService : ISurveyService if (survey.CreatedBy != _userContext.UserId) { - throw new UnauthorizedAccessException("You are not authorized to delete this survey."); + throw new UnauthorizedException("You are not authorized to delete this survey."); } await _surveyRepository.DeleteAsync(survey);