using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using SoroushAsadi.Services; namespace SoroushAsadi.Pages.Admin.Sections; [Authorize] public class SectionsIndexModel(ContentService content) : PageModel { public IReadOnlySet OverrideKeys { get; private set; } = new HashSet(); public void OnGet() => OverrideKeys = content.GetSectionKeys().ToHashSet(); public IActionResult OnPostReset(string key) { content.DeleteSection(key); return RedirectToPage(); } }