Different workings

This commit is contained in:
Janus C. H. Knudsen 2025-06-26 21:30:32 +02:00
parent 9d384cd18d
commit dc98178095
14 changed files with 57 additions and 22 deletions

View file

@ -11,8 +11,6 @@ public class CommandHandlerDecorator<TCommand>(
{
public async Task<CommandResponse> Handle(TCommand command)
{
// var correlationId = Activity.Current?.RootId ?? command.CorrelationId;
using (var operation =
telemetryClient.StartOperation<RequestTelemetry>($"Handle {decoratedHandler.GetType().FullName}",
command.CorrelationId.ToString()))

View file

@ -25,7 +25,7 @@ namespace PlanTempus.Components.Users.Create
@AccessFailedCount, @LockoutEnabled, @IsActive)
RETURNING id, created_at, email, is_active";
var data = await db.Connection.QuerySqlAsync<CreateUserResult>(sql, new
await db.Connection.QuerySqlAsync(sql, new
{
command.Email,
PasswordHash = secureTokenizer.TokenizeText(command.Password),
@ -35,7 +35,8 @@ namespace PlanTempus.Components.Users.Create
LockoutEnabled = false,
command.IsActive,
});
//lav en mapping mellem requestid og userid
return new CommandResponse(command.CorrelationId, command.GetType().Name, command.TransactionId);
}
catch (PostgresException ex) when (ex.SqlState == "23505")

View file

@ -1,8 +0,0 @@
namespace PlanTempus.Components.Users.Create
{
public class UserCreationResult
{
public long Id { get; set; }
public DateTime CreatedAt { get; set; }
}
}