diff --git a/src/Backend/AutopilotMonitor.Functions/Services/BlockedDeviceService.cs b/src/Backend/AutopilotMonitor.Functions/Services/BlockedDeviceService.cs index da903312..8b9476c9 100644 --- a/src/Backend/AutopilotMonitor.Functions/Services/BlockedDeviceService.cs +++ b/src/Backend/AutopilotMonitor.Functions/Services/BlockedDeviceService.cs @@ -64,7 +64,7 @@ namespace AutopilotMonitor.Functions.Services /// /// Blocks a device for the specified duration. Updates both Table Storage and the in-memory cache. /// - public async Task BlockDeviceAsync(string tenantId, string serialNumber, int durationHours, string blockedByEmail, string reason = null) + public async Task BlockDeviceAsync(string tenantId, string serialNumber, int durationHours, string blockedByEmail, string? reason = null) { var now = DateTime.UtcNow; var unblockAt = now.AddHours(durationHours); @@ -212,12 +212,12 @@ namespace AutopilotMonitor.Functions.Services /// public class BlockedDeviceEntry { - public string TenantId { get; set; } - public string SerialNumber { get; set; } + public string TenantId { get; set; } = string.Empty; + public string SerialNumber { get; set; } = string.Empty; public DateTime BlockedAt { get; set; } public DateTime UnblockAt { get; set; } - public string BlockedByEmail { get; set; } + public string BlockedByEmail { get; set; } = string.Empty; public int DurationHours { get; set; } - public string Reason { get; set; } + public string? Reason { get; set; } } }