feat: add fnOS packaging, storage workflows and release pipeline
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using dy.net.model.dto;
|
||||
using dy.net.service;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace dy.net.Controllers
|
||||
{
|
||||
[Route("api/video/exclusions")]
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
public class VideoExclusionsController : ControllerBase
|
||||
{
|
||||
private readonly VideoExclusionService _service;
|
||||
|
||||
public VideoExclusionsController(VideoExclusionService service) => _service = service;
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> List([FromQuery] VideoExclusionPageRequest request) =>
|
||||
ApiResult.Success(await _service.GetPageAsync(request));
|
||||
|
||||
[HttpPost("unexclude")]
|
||||
public async Task<IActionResult> Unexclude([FromBody] UnexcludeVideosRequest request)
|
||||
{
|
||||
try { return ApiResult.Success(await _service.UnexcludeAsync(request)); }
|
||||
catch (Exception ex) when (ex is InvalidOperationException or KeyNotFoundException)
|
||||
{
|
||||
return ApiResult.Fail(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user