mirror of
https://github.com/fergalmoran/podnoms.git
synced 2025-12-22 17:28:43 +00:00
28 lines
999 B
C#
28 lines
999 B
C#
using System.Threading.Tasks;
|
|
using Hangfire;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using PodNoms.Api.Services.Jobs;
|
|
|
|
namespace PodNoms.Api.Controllers {
|
|
[Authorize]
|
|
[Route("[controller]")]
|
|
[ApiExplorerSettings(IgnoreApi = true)]
|
|
public class JobController : Controller {
|
|
[HttpGet("processorphans")]
|
|
public IActionResult ProcessOrphans() {
|
|
var infoJobId = BackgroundJob.Enqueue<ClearOrphanAudioJob>(service => service.Execute());
|
|
return Ok();
|
|
}
|
|
[HttpGet("processplaylists")]
|
|
public IActionResult ProcessPlaylists() {
|
|
var infoJobId = BackgroundJob.Enqueue<ProcessPlaylistsJob>(service => service.Execute());
|
|
return Ok();
|
|
}
|
|
[HttpGet("updateyoutubedl")]
|
|
public IActionResult UpdateYouTubeDl() {
|
|
var infoJobId = BackgroundJob.Enqueue<UpdateYouTubeDlJob>(service => service.Execute());
|
|
return Ok();
|
|
}
|
|
}
|
|
} |