Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
teresaqhoang committed Feb 21, 2024
2 parents 4f402e6 + a0ccb68 commit 1022cc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions webapi/Extensions/ServiceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using CopilotChat.WebApi.Auth;
using CopilotChat.WebApi.Models.Storage;
using CopilotChat.WebApi.Options;
using CopilotChat.WebApi.Services;
using CopilotChat.WebApi.Storage;
using CopilotChat.WebApi.Utilities;
using Microsoft.AspNetCore.Authentication;
Expand Down Expand Up @@ -127,6 +128,15 @@ internal static IServiceCollection AddPlugins(this IServiceCollection services,
return services;
}

internal static IServiceCollection AddMaintenanceServices(this IServiceCollection services)
{
// Inject action stub
services.AddSingleton<IReadOnlyList<IMaintenanceAction>>(
sp => (IReadOnlyList<IMaintenanceAction>)Array.Empty<IMaintenanceAction>());

return services;
}

/// <summary>
/// Add CORS settings.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions webapi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public static async Task Main(string[] args)

// Add in the rest of the services.
builder.Services
.AddMaintenanceServices()
.AddEndpointsApiExplorer()
.AddSwaggerGen()
.AddCorsPolicy(builder.Configuration)
Expand Down

0 comments on commit 1022cc5

Please sign in to comment.