aboutsummaryrefslogtreecommitdiffstats
path: root/src/Endpoints/CreateRadioIndex.cs
blob: 1ef19ab2d5128c231c30b7d2ce8f7a48d5db300e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using Microsoft.AspNetCore.Mvc;

namespace I2R.LightNews.Endpoints;

public class RadioSearchEndpoint : EndpointBase
{
    private readonly NrkRadioService _radio;

    public RadioSearchEndpoint(NrkRadioService radio) {
        _radio = radio;
    }

    [HttpGet("~/create-radio-index")]
    public async Task<ActionResult> HandleASync() {
        await _radio.CreateIndex();
        return Ok();
    }
}