features/api-cleanup #15
@ -7,10 +7,10 @@ using Newsbot.Collector.Api.Domain;
|
|||||||
using Newsbot.Collector.Domain.Models.Config;
|
using Newsbot.Collector.Domain.Models.Config;
|
||||||
using Newsbot.Collector.Services.Jobs;
|
using Newsbot.Collector.Services.Jobs;
|
||||||
|
|
||||||
namespace Newsbot.Collector.Api.Controllers;
|
namespace Newsbot.Collector.Api.Controllers.v1;
|
||||||
|
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("api/codeprojects")]
|
[Route("api/v1/codeprojects")]
|
||||||
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
|
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
|
||||||
public class CodeProjectController
|
public class CodeProjectController
|
||||||
{
|
{
|
||||||
@ -26,7 +26,7 @@ public class CodeProjectController
|
|||||||
|
|
||||||
[HttpPost("check")]
|
[HttpPost("check")]
|
||||||
[Authorize(Roles = Authorization.AdministratorsRole)]
|
[Authorize(Roles = Authorization.AdministratorsRole)]
|
||||||
public void PullNow()
|
public ActionResult PullNow()
|
||||||
{
|
{
|
||||||
BackgroundJob.Enqueue<CodeProjectWatcherJob>(x => x.InitAndExecute(new CodeProjectWatcherJobOptions
|
BackgroundJob.Enqueue<CodeProjectWatcherJob>(x => x.InitAndExecute(new CodeProjectWatcherJobOptions
|
||||||
{
|
{
|
||||||
@ -34,5 +34,7 @@ public class CodeProjectController
|
|||||||
FeaturePullReleases = true,
|
FeaturePullReleases = true,
|
||||||
FeaturePullCommits = true
|
FeaturePullCommits = true
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
return new AcceptedResult();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user