Skip to content

Commit

Permalink
markup route parameters as services
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Dec 20, 2024
1 parent bf505cd commit 413f83f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/FwLite/LocalWebApp/Routes/FwIntegrationRoutes.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using FwDataMiniLcmBridge;
using LocalWebApp.Hubs;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
using Microsoft.OpenApi.Models;

Expand All @@ -19,7 +20,10 @@ public static IEndpointConventionBuilder MapFwIntegrationRoutes(this WebApplicat
return operation;
});
group.MapGet("/open/entry/{id}",
async (FwDataProjectContext context, IHubContext<FwDataMiniLcmHub, ILexboxHubClient> hubContext, FwDataFactory factory, Guid id) =>
async ([FromServices] FwDataProjectContext context,
[FromServices] IHubContext<FwDataMiniLcmHub, ILexboxHubClient> hubContext,
[FromServices] FwDataFactory factory,
Guid id) =>
{
if (context.Project is null) return Results.BadRequest("No project is set in the context");
await hubContext.Clients.Group(context.Project.Name).OnProjectClosed(CloseReason.Locked);
Expand Down

0 comments on commit 413f83f

Please sign in to comment.