Esempio n. 1
0
        public IHttpActionResult HiddenImages(HiddenImageBindingModel model)
        {
            if (!ModelState.IsValid)
            {
                return(this.BadRequest());
            }

            var club = this.clubs.GetById(model.ClubId);

            if (club == null)
            {
                return(this.BadRequest());
            }

            var newHiddenImage = new ClubHiddenImage()
            {
                ClubId = club.Id,
                Path   = model.Path
            };

            this.hiddenImages.Add(newHiddenImage);

            return(this.Ok());
        }
Esempio n. 2
0
        public IHttpActionResult HiddenImages(HiddenImageBindingModel model)
        {
            if (!ModelState.IsValid)
            {
                return this.BadRequest();
            }

            var club = this.clubs.GetById(model.ClubId);
            if (club == null)
            {
                return this.BadRequest();
            }

            var newHiddenImage = new ClubHiddenImage()
            {
                ClubId = club.Id,
                Path = model.Path
            };

            this.hiddenImages.Add(newHiddenImage);

            return this.Ok();
        }