Skip to content

Commit

Permalink
Set the HelpdeskId to string
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Sep 3, 2024
1 parent d3a577b commit 43fed2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Sample/Helpdesk/Helpdesk.Api/Helpdesk.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
<PackageReference Include="Confluent.Kafka" Version="2.5.2" />
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Core.WebApi\Core.WebApi.csproj" />
</ItemGroup>
</Project>
7 changes: 4 additions & 3 deletions Sample/Helpdesk/Helpdesk.Api/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Core.WebApi.Middlewares.ExceptionHandling;
using Helpdesk.Api.Core.Http;
using Helpdesk.Api.Core.Kafka;
using Helpdesk.Api.Core.Marten;
Expand All @@ -13,7 +14,6 @@
using Marten.AspNetCore;
using Marten.Events;
using Marten.Events.Daemon.Resiliency;
using Marten.Events.Projections;
using Marten.Pagination;
using Marten.Schema.Identity;
using Marten.Storage;
Expand All @@ -34,6 +34,7 @@
builder.Services
.AddEndpointsApiExplorer()
.AddSwaggerGen()
.AddDefaultExceptionHandler()
.AddMarten(sp =>
{
var options = new StoreOptions();
Expand All @@ -49,7 +50,7 @@
options.Events.TenancyStyle = TenancyStyle.Conjoined;
options.Policies.AllDocumentsAreMultiTenanted();

options.Events.StreamIdentity = StreamIdentity.AsString;
options.Events.StreamIdentity = StreamIdentity.AsGuid;
options.Events.MetadataConfig.HeadersEnabled = true;
options.Events.MetadataConfig.CausationIdEnabled = true;
options.Events.MetadataConfig.CorrelationIdEnabled = true;
Expand Down Expand Up @@ -257,7 +258,7 @@ await documentSession.GetAndUpdate<Incident>(incidentId, ToExpectedVersion(eTag)
querySession.Json.WriteById<CustomerIncidentsSummary>(customerId, context)
);

app.UseSwagger()
app.UseExceptionHandler().UseSwagger()
.UseSwaggerUI()
.UseForwardedHeaders(); // Header forwarding to enable Swagger in Nginx

Expand Down

0 comments on commit 43fed2c

Please sign in to comment.