Example #1
0
        public async Task <IActionResult> CreateShare([FromBody] CreateShareViewModel createShare)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            try
            {
                var share = await _providerService.CreateShare(createShare);

                return(Ok(share));
            }
            catch (System.Exception)
            {
                return(BadRequest("Couldn't create share"));
            }
        }