Refactor envelope receiver auth flow and state handling
- Introduce IReceiverAuthService and ReceiverAuthService for all envelope receiver authentication and status API calls - Add ReceiverAuthModel as a client-side DTO for API responses - Refactor EnvelopeState to store all relevant fields and update via ApplyApiResponse - Overhaul EnvelopePage.razor to use new service and state, with improved status handling and UI - Enhance ApiResponse and ApiServiceBase to support structured error deserialization - Register IReceiverAuthService in DI container
This commit is contained in:
@@ -19,6 +19,14 @@ public record ApiResponse<T>
|
||||
|
||||
public static ApiResponse<T> Failure(int statusCode, string? error = null)
|
||||
=> new() { IsSuccess = false, StatusCode = statusCode, ErrorMessage = error };
|
||||
|
||||
/// <summary>
|
||||
/// Failure mit deserialisiertem Body — für Fälle wo die API
|
||||
/// bei 401/404 trotzdem ein strukturiertes JSON zurückgibt
|
||||
/// (z.B. ReceiverAuthResponse mit ErrorMessage + Status).
|
||||
/// </summary>
|
||||
public static ApiResponse<T> Failure(int statusCode, string? error, T? data)
|
||||
=> new() { IsSuccess = false, StatusCode = statusCode, ErrorMessage = error, Data = data };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user