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()); }
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(); }