Beispiel #1
0
        public async Task <ActionResult <ArtistApiModel> > Get(int id, CancellationToken ct = default)
        {
            try
            {
                var artist = await _BlazorSupervisor.GetArtistByIdAsync(id, ct);

                if (artist == null)
                {
                    return(NotFound());
                }

                return(Ok(artist));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex));
            }
        }