Skip to content

Commit

Permalink
Merge pull request #69 from rubberduck-vba/webhook
Browse files Browse the repository at this point in the history
Fix github download timing +CORS issues
  • Loading branch information
retailcoder authored Mar 3, 2025
2 parents 52c11ee + 3a17546 commit 5a7a945
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

public class LoadGitHubTagsBlock : TransformBlockBase<SyncRequestParameters, SyncContext, SyncContext>
public class LoadGitHubTagsBlock : TransformBlockBase<SyncContext, SyncContext, SyncContext>
{
private readonly IGitHubClientService _github;

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

public override async Task<SyncContext> TransformAsync(SyncRequestParameters input)
public override async Task<SyncContext> TransformAsync(SyncContext input)
{
var githubTags = await _github.GetAllTagsAsync(Context.RubberduckDbMain.Name);
var (gitHubMain, gitHubNext, gitHubOthers) = githubTags.GetLatestTags();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public override void CreateBlocks()
AcquireDbNextTag.CreateBlock(BroadcastParameters);
JoinDbTags.CreateBlock(AcquireDbMainTag, AcquireDbNextTag);
LoadDbTags.CreateBlock(JoinDbTags);
LoadGitHubTags.CreateBlock(BroadcastParameters);
LoadGitHubTags.CreateBlock(LoadDbTags);
JoinTags.CreateBlock(LoadDbTags, LoadGitHubTags);
BroadcastTags.CreateBlock(JoinTags);
StreamGitHubTags.CreateBlock(BroadcastTags);
Expand Down
4 changes: 3 additions & 1 deletion rubberduckvba.Server/RubberduckApiController.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using rubberduckvba.Server;
using System.Diagnostics;
using System.Runtime.CompilerServices;

namespace rubberduckvba.Server;

[ApiController]
[EnableCors("CorsPolicy")]
public abstract class RubberduckApiController : ControllerBase
{
private readonly ILogger _logger;
Expand Down

0 comments on commit 5a7a945

Please sign in to comment.