Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Wright authored and Lee Wright committed Jul 16, 2024
1 parent de2371f commit 29c6e29
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ private async Task<AccessRequest> CreateInCustodyAccessRequest(ExtendedUserRepre

if (party != null)
{
logger.LogPartyAlreadyPresent(party.Jpdid);
logger.LogPartyAlreadyPresent(party.Jpdid, party.Id);
}
else
{

party = new Party
{
UserId = keycloakUser.Id,
Expand All @@ -146,6 +147,13 @@ private async Task<AccessRequest> CreateInCustodyAccessRequest(ExtendedUserRepre
Email = keycloakUser.Username
};

var altId = new PartyAlternateId
{
Name = "CSNumber",
Value = value.CSNumber,
Party = party
};

context.Parties.Add(party);
await context.SaveChangesAsync();
party = context.Parties.Where(p => p.Jpdid == keycloakUser.Username).FirstOrDefault();
Expand Down Expand Up @@ -255,8 +263,8 @@ public static partial class InCustodyServiceLoggingExtensions
public static partial void LogIDPNotFound(this ILogger logger, string realm, string idp);
[LoggerMessage(11, LogLevel.Error, "Failed to complete in-custody onboarding {msg}")]
public static partial void LogInCustodyServiceException(this ILogger logger, string msg, Exception ex);
[LoggerMessage(12, LogLevel.Information, "Party already present {party}")]
public static partial void LogPartyAlreadyPresent(this ILogger logger, string party);
[LoggerMessage(12, LogLevel.Information, "Party already present {party} {partyId}")]
public static partial void LogPartyAlreadyPresent(this ILogger logger, string party, int partyId);
[LoggerMessage(13, LogLevel.Information, "Access request {accessRequestId} already present for party {party}")]
public static partial void LogAccessRequestAlreadyPresent(this ILogger logger, string party, int accessRequestId);

Expand Down

0 comments on commit 29c6e29

Please sign in to comment.