Refactor controllers and update envelope status handling
- Updated `TestEnvelopeHistoryController` to use `EnvelopeStatus` for status parameters and marked it as obsolete. - Modified `TestViewController` with new route attributes, simplified constructor, and improved error handling in HTTP methods. - Cleaned up `DebugEnvelopes.cshtml` by removing unnecessary using directives and ensuring type safety in envelope grouping.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
@using EnvelopeGenerator.CommonServices;
|
||||
@using EnvelopeGenerator.Domain;
|
||||
@using EnvelopeGenerator.Domain.Entities;
|
||||
@using static EnvelopeGenerator.Domain.Constants;
|
||||
@{
|
||||
ViewData["Title"] = "Debug";
|
||||
@@ -12,9 +12,9 @@
|
||||
return Helpers.EncodeEnvelopeReceiverId(envelope.Uuid, receiver.Signature);
|
||||
}
|
||||
|
||||
IEnumerable<IGrouping<EnvelopeStatus, Envelope>> groupEnvelopes(List<Envelope> envelopes)
|
||||
IEnumerable<IGrouping<EnvelopeStatus, Envelope>> groupEnvelopes(List<Envelope> envelopes)
|
||||
{
|
||||
return envelopes.GroupBy(item => item.Status).OrderBy(item => (int)item.Key);
|
||||
return envelopes.GroupBy(item => (EnvelopeStatus) item.Status).OrderBy(item => item.Key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user