Different workings
This commit is contained in:
parent
9d384cd18d
commit
dc98178095
14 changed files with 57 additions and 22 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -360,5 +360,3 @@ MigrationBackup/
|
|||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
.idea/.idea.PlanTempus/.idea/
|
||||
|
|
|
|||
13
.idea/.idea.PlanTempus/.idea/.gitignore
generated
vendored
Normal file
13
.idea/.idea.PlanTempus/.idea/.gitignore
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/modules.xml
|
||||
/.idea.PlanTempus.iml
|
||||
/contentModel.xml
|
||||
/projectSettingsUpdater.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
18
.idea/.idea.PlanTempus/.idea/dataSources.xml
generated
Normal file
18
.idea/.idea.PlanTempus/.idea/dataSources.xml
generated
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="ptmain@192.168.1.57" uuid="26c97165-2025-4887-bf2a-e69eedd07a45">
|
||||
<driver-ref>postgresql</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:postgresql://192.168.1.57:5432/ptmain</jdbc-url>
|
||||
<jdbc-additional-properties>
|
||||
<property name="com.intellij.clouds.kubernetes.db.host.port" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.resource.type" value="Deployment" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.container.port" />
|
||||
</jdbc-additional-properties>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
||||
4
.idea/.idea.PlanTempus/.idea/encodings.xml
generated
Normal file
4
.idea/.idea.PlanTempus/.idea/encodings.xml
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
8
.idea/.idea.PlanTempus/.idea/indexLayout.xml
generated
Normal file
8
.idea/.idea.PlanTempus/.idea/indexLayout.xml
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/.idea.PlanTempus/.idea/vcs.xml
generated
Normal file
6
.idea/.idea.PlanTempus/.idea/vcs.xml
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ArrayOfCrmConnectionInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://kdtooling.kupp.at/kdtooling/schema_1.0" />
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
namespace PlanTempus.Core.CommandQueries;
|
||||
namespace PlanTempus.Core.CommandQueries;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response to a command request, typically used in asynchronous operations.
|
||||
/// Represents a response to a command request
|
||||
/// This class includes details such as a unique request ID, correlation ID, command name,
|
||||
/// transaction ID, creation timestamp, and a URL to check the status of the command.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -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()))
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
namespace PlanTempus.Components.Users.Create
|
||||
{
|
||||
public class UserCreationResult
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
{"resources":{"Scripts/Script-1.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"},"Scripts/Script.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"},"Scripts/SmartConfigSystem.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptdb01"},"Scripts/grant-privileges.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"}}}
|
||||
{"resources":{"Scripts/Script-1.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"sandbox"},"Scripts/Script.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"},"Scripts/SmartConfigSystem.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptdb01"},"Scripts/grant-privileges.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"}}}
|
||||
|
|
@ -1 +1 @@
|
|||
{"resources":{"Scripts/Script-1.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"},"Scripts/Script.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"},"Scripts/SmartConfigSystem.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptdb01"},"Scripts/grant-privileges.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"}}}
|
||||
{"resources":{"Scripts/Script-1.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"sandbox"},"Scripts/Script.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"},"Scripts/SmartConfigSystem.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptdb01"},"Scripts/grant-privileges.sql":{"default-datasource":"postgres-jdbc-1948450a8b4-5fc9eec404e65c44","default-catalog":"ptmain"}}}
|
||||
|
|
@ -25,7 +25,7 @@ public class HandlerTest : TestFixture
|
|||
|
||||
var command = new CreateUserCommand
|
||||
{
|
||||
Email = "lloyd@dumbanddumber.com3", // Lloyd Christmas
|
||||
Email = "lloyd@dumbanddumber.com5", // Lloyd Christmas
|
||||
Password = "1234AceVentura#LOL", // Ace Ventura
|
||||
IsActive = true,
|
||||
CorrelationId = Guid.NewGuid()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue