using Moonlight.Api.Interfaces; using Moonlight.Api.Models; using Moonlight.Api.Services; namespace Moonlight.Api.Implementations; public sealed class UpdateDiagnoseProvider : IDiagnoseProvider { private readonly ApplicationService ApplicationService; public UpdateDiagnoseProvider(ApplicationService applicationService) { ApplicationService = applicationService; } public Task DiagnoseAsync() { if (ApplicationService.IsUpToDate) return Task.FromResult([]); return Task.FromResult([ new DiagnoseResult( DiagnoseLevel.Warning, "Instance is not up-to-date", ["Moonlight", "Update Check"], "Update your moonlight instance to receive bug fixes, new features and security patches. Update button can be found in the overview", null, "/admin", null ) ]); } }