Skip to content

Commit

Permalink
fix server
Browse files Browse the repository at this point in the history
  • Loading branch information
ghsales committed Nov 27, 2024
1 parent fed0182 commit 59c1b3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/SSync.Server.LitebDB/Abstractions/ISSyncEntityRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
4 changes: 3 additions & 1 deletion src/SSync.Server.LitebDB/Sync/SchemaCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ private async Task<DateTime> 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");
}
}
}
Expand Down

0 comments on commit 59c1b3a

Please sign in to comment.