From 59c1b3ae561cdfd39b3219f78ef12b99230d8880 Mon Sep 17 00:00:00 2001 From: Gabriel Sales Date: Wed, 27 Nov 2024 16:05:14 -0300 Subject: [PATCH] fix server --- src/SSync.Server.LitebDB/Abstractions/ISSyncEntityRoot.cs | 3 +++ src/SSync.Server.LitebDB/Sync/SchemaCollection.cs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SSync.Server.LitebDB/Abstractions/ISSyncEntityRoot.cs b/src/SSync.Server.LitebDB/Abstractions/ISSyncEntityRoot.cs index b7fdd17..7ba5e53 100644 --- a/src/SSync.Server.LitebDB/Abstractions/ISSyncEntityRoot.cs +++ b/src/SSync.Server.LitebDB/Abstractions/ISSyncEntityRoot.cs @@ -12,16 +12,19 @@ protected ISSyncEntityRoot() { Id = Guid.NewGuid(); CreatedAt = DateTime.UtcNow; + UpdatedAt = DateTime.UtcNow; } protected ISSyncEntityRoot(Time time) { Id = Guid.NewGuid(); CreatedAt = time == Time.LOCAL_TIME ? DateTime.Now : DateTime.UtcNow; + UpdatedAt = time == Time.LOCAL_TIME ? DateTime.Now : DateTime.UtcNow; } protected ISSyncEntityRoot(Guid id, Time time) { Id = id; CreatedAt = time == Time.LOCAL_TIME ? DateTime.Now : DateTime.UtcNow; + UpdatedAt = time == Time.LOCAL_TIME ? DateTime.Now : DateTime.UtcNow; } public Guid Id { get; set; } public DateTime CreatedAt { get; set; } diff --git a/src/SSync.Server.LitebDB/Sync/SchemaCollection.cs b/src/SSync.Server.LitebDB/Sync/SchemaCollection.cs index 3077bf4..bfd0517 100644 --- a/src/SSync.Server.LitebDB/Sync/SchemaCollection.cs +++ b/src/SSync.Server.LitebDB/Sync/SchemaCollection.cs @@ -282,7 +282,9 @@ private async Task ExecuteChanges(JsonArray changes, SSyncParameter pa { Log($"Error in parse change of collection {collectionName} to type {schemaType.Name}", consoleColor: ConsoleColor.Red); - throw new PushChangeException("Not push changes"); + Log($"Not push changes", consoleColor: ConsoleColor.Red); + + // throw new PushChangeException("Not push changes"); } } }