public bool FavoriteClassified(int classifiedId) { if (!_classifiedService.CheckIfActive(classifiedId)) { throw new HttpResponseException(NotFoundMessage("هذا الإعلان غير متاح")); } if (_classifiedService.IsPreviouslyFavorited(CurrentUserId, classifiedId)) { throw new HttpResponseException(NotFoundMessage("الإعلان تمت إضافته مسبقاً للمفضّلة")); } return(_classifiedService.FavoriteClassified(CurrentUserId, classifiedId)); }