Cześć tak wygląda mój endpoint:
[AllowAnonymous]
[HttpGet]
[Route("{userId?}/ActiveList/{page}")]
public async Task<IActionResult> GetAllActive(int? page, [FromBody]TenureSearchCriteria query, Guid? userId = null)
{
return Ok(await tenureService.GetAllActiveAsync( page, query, userId.ToString()));
}
Czy można zrobić aby się wykonał kiedy userId jest nullem ? bo na razie angular łączy się z API i chę wykonać tego endpointa nic się niedzieje :( a tak wygląda to w api-service:
GetAllActive(page, search, userId?) {
return this.http.post(`Tenure/${userId}/ActiveList/${page}`, search);
}