public async Task <IActionResult> GetAllMyLeasings() { try { var id = ExtractIdFromToken(Request.Headers[HttpRequestHeader.Authorization.ToString()]); return(Ok(await service.GetAllLeasingsByUserId(id))); } catch (HttpResponseException) { throw; } catch (Exception) { throw new BadRequestApiException(); } }
public async Task <IActionResult> GetAllUserLeasings([FromRoute(Name = "id")] Guid userId) { return(Ok(await leasingsService.GetAllLeasingsByUserId(userId))); }