public async Task <IActionResult> Follow(int schoolId, int id) { if (await userService.Follow(schoolId, id)) { var follow = await database.UserRepository.GetFollow(schoolId, id); if (follow == null) { throw new EntityNotFoundException(); } var followToReturn = mapper.Map <FollowDetailsDto>(follow); await notificationSystem.PushNotification(follow.School.OwnerId, StaticExpressions.NewFollow(follow.User.UserName)); return(Ok(followToReturn)); } return(BadRequest("Nie udało się dodać szkółki do listy ulubionych")); }