Skip to content

Commit

Permalink
register post services
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsPilgaard committed Sep 14, 2024
1 parent 17aa5e7 commit 8a40302
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/web/Jordnaer/Features/PostSearch/WebApplicationExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Jordnaer.Features.PostSearch;

public static class WebApplicationExtensions
{
public static WebApplicationBuilder AddPostSearchService(this WebApplicationBuilder builder)
{
builder.Services.AddScoped<IPostSearchService, PostSearchService>();

return builder;
}
}
11 changes: 11 additions & 0 deletions src/web/Jordnaer/Features/Posts/WebApplicationExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Jordnaer.Features.Posts;

public static class WebApplicationExtensions
{
public static WebApplicationBuilder AddPostService(this WebApplicationBuilder builder)
{
builder.Services.AddScoped<IPostService, PostService>();

return builder;
}
}
4 changes: 4 additions & 0 deletions src/web/Jordnaer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Jordnaer.Database;
using Jordnaer.Features.Membership;
using Jordnaer.Features.Posts;
using Jordnaer.Features.PostSearch;
using Jordnaer.Features.Search;
using Microsoft.Net.Http.Headers;
using Sidio.Sitemap.AspNetCore;
Expand Down Expand Up @@ -79,6 +81,8 @@
builder.AddProfileServices();
builder.AddChatServices();
builder.AddMembershipServices();
builder.AddPostService();
builder.AddPostSearchService();

builder.AddMudBlazor();

Expand Down

0 comments on commit 8a40302

Please sign in to comment.