Пример #1
0
        public IHttpActionResult AttatchProfileImage(int id, AttatchProfileImageBindingModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (_petService.AttatchProfileImage(id, model.PetImageID))
            {
                return(Ok());
            }

            // Otherwise
            return(InternalServerError(new Exception("No image with that id")));
        }