Exemple #1
0
        public async Task <IActionResult> Post([FromBody] AlbumViewModel input,
                                               CancellationToken ct = default(CancellationToken))
        {
            try
            {
                if (input == null)
                {
                    return(BadRequest());
                }

                return(StatusCode(201, await _dataManager.AddAlbumAsync(input, ct)));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex));
            }
        }