Пример #1
0
        public async Task <IHttpActionResult> AddPhoto([FromBody] Photo photo, long id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var res = GalleryService.AddNewPhoto(id, await GetCurrentId(), photo);

            if (res == null)
            {
                return(BadRequest("Can not add photo to this gallery..."));
            }
            return(Ok(res));
        }