Skip to content

Commit 5a7a945

Browse files
authored
Merge pull request #69 from rubberduck-vba/webhook
Fix github download timing +CORS issues
2 parents 52c11ee + 3a17546 commit 5a7a945

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

rubberduckvba.Server/ContentSynchronization/Pipeline/Sections/SyncTags/LoadGitHubTagsBlock.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace rubberduckvba.Server.ContentSynchronization.Pipeline.Sections.SyncTags;
66

7-
public class LoadGitHubTagsBlock : TransformBlockBase<SyncRequestParameters, SyncContext, SyncContext>
7+
public class LoadGitHubTagsBlock : TransformBlockBase<SyncContext, SyncContext, SyncContext>
88
{
99
private readonly IGitHubClientService _github;
1010

@@ -14,7 +14,7 @@ public LoadGitHubTagsBlock(PipelineSection<SyncContext> parent, CancellationToke
1414
_github = github;
1515
}
1616

17-
public override async Task<SyncContext> TransformAsync(SyncRequestParameters input)
17+
public override async Task<SyncContext> TransformAsync(SyncContext input)
1818
{
1919
var githubTags = await _github.GetAllTagsAsync(Context.RubberduckDbMain.Name);
2020
var (gitHubMain, gitHubNext, gitHubOthers) = githubTags.GetLatestTags();

rubberduckvba.Server/ContentSynchronization/Pipeline/Sections/SyncTags/SyncTagsSection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public override void CreateBlocks()
7373
AcquireDbNextTag.CreateBlock(BroadcastParameters);
7474
JoinDbTags.CreateBlock(AcquireDbMainTag, AcquireDbNextTag);
7575
LoadDbTags.CreateBlock(JoinDbTags);
76-
LoadGitHubTags.CreateBlock(BroadcastParameters);
76+
LoadGitHubTags.CreateBlock(LoadDbTags);
7777
JoinTags.CreateBlock(LoadDbTags, LoadGitHubTags);
7878
BroadcastTags.CreateBlock(JoinTags);
7979
StreamGitHubTags.CreateBlock(BroadcastTags);

rubberduckvba.Server/RubberduckApiController.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
using Microsoft.AspNetCore.Mvc;
1+
using Microsoft.AspNetCore.Cors;
2+
using Microsoft.AspNetCore.Mvc;
23
using rubberduckvba.Server;
34
using System.Diagnostics;
45
using System.Runtime.CompilerServices;
56

67
namespace rubberduckvba.Server;
78

89
[ApiController]
10+
[EnableCors("CorsPolicy")]
911
public abstract class RubberduckApiController : ControllerBase
1012
{
1113
private readonly ILogger _logger;

0 commit comments

Comments
 (0)