Used DateTimeOffset instead of DateTime
This commit is contained in:
parent
bd3797dea5
commit
e52d716eaa
|
|
@ -5,5 +5,5 @@ public enum ApplicationRole
|
|||
Default,
|
||||
Api,
|
||||
Worker,
|
||||
Monitoring
|
||||
Monitor
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ public class HasJournalUpdateRequest
|
|||
/// The unique identifier of a workflow instance.
|
||||
public string WorkflowInstanceId { get; set; } = default!;
|
||||
|
||||
/// The start date for checking for updates in the workflow instance.
|
||||
public DateTime UpdatesSince { get; set; }
|
||||
/// The start date for checking for updates in the workflow instance journal.
|
||||
public DateTimeOffset UpdatesSince { get; set; }
|
||||
}
|
||||
|
|
@ -31,8 +31,8 @@ public static class WebApplicationExtensions
|
|||
config.Serializer.RequestDeserializer = DeserializeRequestAsync;
|
||||
config.Serializer.ResponseSerializer = SerializeRequestAsync;
|
||||
|
||||
config.Binding.ValueParserFor<DateTime>(s =>
|
||||
new(DateTime.TryParse(s.ToString(),CultureInfo.InvariantCulture,DateTimeStyles.RoundtripKind, out var result), result));
|
||||
config.Binding.ValueParserFor<DateTimeOffset>(s =>
|
||||
new(DateTimeOffset.TryParse(s.ToString(),CultureInfo.InvariantCulture,DateTimeStyles.RoundtripKind, out var result), result));
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ using FastEndpoints;
|
|||
|
||||
namespace Elsa.Workflows.Api.Endpoints.WorkflowInstances.Journal.HasUpdates;
|
||||
|
||||
/// The request to check if there are updates for a workflow instance.
|
||||
/// The request to check if there are updates for a workflow instance journal.
|
||||
public class Request
|
||||
{
|
||||
/// The unique identifier of a workflow instance.
|
||||
[BindFrom("id")] public string WorkflowInstanceId { get; set; } = default!;
|
||||
|
||||
/// The start date for checking for updates in the workflow instance.
|
||||
public DateTime UpdatesSince { get; set; }
|
||||
/// The start date for checking for updates in the workflow instance journal.
|
||||
public DateTimeOffset UpdatesSince { get; set; }
|
||||
}
|
||||
Loading…
Reference in a new issue