blob: d654ad81a572128bbfd88cd17fc67b702259be69 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
using Microsoft.AspNetCore.Mvc;
namespace I2R.LightNews.Endpoints;
public class GetRadioSeriesDetails : EndpointBase
{
private readonly NrkRadioService _radio;
public GetRadioSeriesDetails(NrkRadioService radio) {
_radio = radio;
}
public class Response
{
public List<RadioSeason> Seasons { get; set; }
public List<RadioEpisode> Episodes { get; set; }
}
[HttpGet("~/radio-series/{id:int}")]
public ActionResult GetRadioSeries(int id) {
var series = RadioIndexDb.GetSeriesById(id);
if (series == default) {
return NoContent();
}
return Ok(series);
}
}
|