mirror of
https://github.com/bitwarden/server.git
synced 2025-05-04 11:12:20 -05:00
IHttpContextAccessor registration missing
This commit is contained in:
parent
59820678fa
commit
4853917924
@ -33,7 +33,7 @@ namespace Bit.Billing.Controllers
|
|||||||
return new BadRequestResult();
|
return new BadRequestResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
var parsedEvent = StripeEventUtility.ParseEventDataItem<StripeEvent>(body) as StripeEvent;
|
var parsedEvent = StripeEventUtility.ParseEventDataItem<StripeEvent>(body);
|
||||||
if(string.IsNullOrWhiteSpace(parsedEvent?.Id))
|
if(string.IsNullOrWhiteSpace(parsedEvent?.Id))
|
||||||
{
|
{
|
||||||
return new BadRequestResult();
|
return new BadRequestResult();
|
||||||
|
@ -8,6 +8,8 @@ using Bit.Core;
|
|||||||
using Stripe;
|
using Stripe;
|
||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
|
|
||||||
namespace Bit.Billing
|
namespace Bit.Billing
|
||||||
{
|
{
|
||||||
@ -44,6 +46,8 @@ namespace Bit.Billing
|
|||||||
services.AddBaseServices();
|
services.AddBaseServices();
|
||||||
services.AddDefaultServices();
|
services.AddDefaultServices();
|
||||||
|
|
||||||
|
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||||
|
|
||||||
// Mvc
|
// Mvc
|
||||||
services.AddMvc();
|
services.AddMvc();
|
||||||
}
|
}
|
||||||
@ -60,6 +64,11 @@ namespace Bit.Billing
|
|||||||
.AddConsole()
|
.AddConsole()
|
||||||
.AddDebug();
|
.AddDebug();
|
||||||
|
|
||||||
|
if(env.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseDeveloperExceptionPage();
|
||||||
|
}
|
||||||
|
|
||||||
app.UseMvc();
|
app.UseMvc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user