Пример #1
0
        public static void OnFavoriteOtherCatholicPrayer(int otherCatholicPrayerId)
        {
            var userId = Auth.user().Id;

            var service = new FavoritesService();

            if (service.IsOtherCatholicPrayerAlreadyInFavorites(userId, otherCatholicPrayerId))
            {
                service.RemoveOtherCatholicPrayer(userId, otherCatholicPrayerId);
            }
            else
            {
                service.AddOtherCatholicPrayer(userId, otherCatholicPrayerId);
            }
        }