public IActionResult GetBorrowByGearId(int id) { var currentUserProfile = GetCurrentProfile(); var borrow = _borrowRepository.GetBorrowByGearId(id, currentUserProfile.Id); if (borrow == null) { return(NotFound()); } return(Ok(borrow)); }