Пример #1
0
        public bool LikeClassified(int classifiedId)
        {
            if (!_classifiedService.CheckIfActive(classifiedId))
            {
                throw new HttpResponseException(NotFoundMessage("هذا الإعلان غير متاح"));
            }

            if (_classifiedService.IsPreviouslyLiked(CurrentUserId, classifiedId))
            {
                throw new HttpResponseException(NotFoundMessage("الإعلان تم الإعجاب به مسبقاً"));
            }

            return(_classifiedService.LikeClassified(CurrentUserId, classifiedId));
        }