implemented custom SurveyService.cs

This commit is contained in:
Вячеслав 2025-04-20 15:30:20 +05:00
parent 7a1078457d
commit 00e93fde2e
2 changed files with 38 additions and 8 deletions

View file

@ -60,4 +60,13 @@ public class SurveyController : ControllerBase
await _surveyService.DeleteSurveyAsync(id);
return Ok();
}
[Authorize]
[HttpGet("my_surveys")]
public async Task<IActionResult> GetMySurveys()
{
var userId = _userContext.UserId;
var result = await _surveyService.GetSurveysByUserIdAsync(userId);
return Ok(result);
}
}