implemented custom SurveyService.cs
This commit is contained in:
parent
7a1078457d
commit
00e93fde2e
2 changed files with 38 additions and 8 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue