Skip to content

Commit

Permalink
rename and move LexboxApiHub.cs to CrdtMiniLcmApiHub.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Jun 6, 2024
1 parent c408824 commit 681569c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
using MiniLcm;
using SystemTextJsonPatch;

namespace LocalWebApp;
namespace LocalWebApp.Hubs;

public interface ILexboxClient
{
Task OnEntryUpdated(Entry entry);
}

public class LexboxApiHub(
public class CrdtMiniLcmApiHub(
ILexboxApi lexboxApi,
IOptions<JsonOptions> jsonOptions,
BackgroundSyncService backgroundSyncService,
Expand Down
3 changes: 2 additions & 1 deletion backend/LocalWebApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using LcmCrdt;
using LocalWebApp;
using LocalWebApp.Hubs;
using LocalWebApp.Routes;
using Microsoft.AspNetCore.StaticFiles.Infrastructure;
using Microsoft.Extensions.FileProviders;
Expand Down Expand Up @@ -36,7 +37,7 @@

await next(context);
});
app.MapHub<LexboxApiHub>($"/api/hub/{{{LexboxApiHub.ProjectRouteKey}}}/lexbox");
app.MapHub<CrdtMiniLcmApiHub>($"/api/hub/{{{CrdtMiniLcmApiHub.ProjectRouteKey}}}/lexbox");
app.MapHistoryRoutes();
app.MapActivities();
app.MapProjectRoutes();
Expand Down
3 changes: 2 additions & 1 deletion backend/LocalWebApp/Routes/ActivityRoutes.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Crdt.Changes;
using Crdt.Core;
using Crdt.Db;
using LocalWebApp.Hubs;
using Microsoft.EntityFrameworkCore;
using Microsoft.OpenApi.Models;

Expand All @@ -14,7 +15,7 @@ public static IEndpointConventionBuilder MapActivities(this WebApplication app)
{
operation.Parameters.Add(new OpenApiParameter()
{
Name = LexboxApiHub.ProjectRouteKey,
Name = CrdtMiniLcmApiHub.ProjectRouteKey,
In = ParameterLocation.Path,
Required = true
});
Expand Down
3 changes: 2 additions & 1 deletion backend/LocalWebApp/Routes/HistoryRoutes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Crdt.Entities;
using LinqToDB;
using LinqToDB.EntityFrameworkCore;
using LocalWebApp.Hubs;
using Microsoft.OpenApi.Models;

namespace LocalWebApp.Routes;
Expand All @@ -17,7 +18,7 @@ public static IEndpointConventionBuilder MapHistoryRoutes(this WebApplication ap
{
operation.Parameters.Add(new OpenApiParameter()
{
Name = LexboxApiHub.ProjectRouteKey, In = ParameterLocation.Path, Required = true
Name = CrdtMiniLcmApiHub.ProjectRouteKey, In = ParameterLocation.Path, Required = true
});
return operation;
});
Expand Down
3 changes: 2 additions & 1 deletion backend/LocalWebApp/Routes/TestRoutes.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Crdt.Core;
using Crdt.Db;
using LocalWebApp.Hubs;
using Microsoft.EntityFrameworkCore;
using Microsoft.OpenApi.Models;
using MiniLcm;
Expand All @@ -15,7 +16,7 @@ public static IEndpointConventionBuilder MapTest(this WebApplication app)
{
operation.Parameters.Add(new OpenApiParameter()
{
Name = LexboxApiHub.ProjectRouteKey,
Name = CrdtMiniLcmApiHub.ProjectRouteKey,
In = ParameterLocation.Path,
Required = true
});
Expand Down

0 comments on commit 681569c

Please sign in to comment.