Skip to content

Commit

Permalink
Simplify EditorChoice config retrieval
Browse files Browse the repository at this point in the history
Updated the way the `EditorChoice` configuration value is retrieved. Instead of using `Configuration.GetSection("Post:Editor").Get<EditorChoice>()`, it now uses `Configuration.GetValue<EditorChoice>("Post:Editor")`. This change simplifies the retrieval process by directly getting the value of the specified type from the configuration.
  • Loading branch information
EdiWang committed Feb 3, 2025
1 parent bd31df9 commit d036567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Moonglade.Web/Pages/Admin/EditPost.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}

@section meta {
<meta name="editor-choice" content="@(Configuration.GetSection("Post:Editor").Get<EditorChoice>().ToString().ToLower())" />
<meta name="editor-choice" content="@(Configuration.GetValue<EditorChoice>("Post:Editor").ToString().ToLower())" />
<meta name="warn-slug-modification" content="@Model.ViewModel.WarnSlugModification.ToString().ToLower()" />
}

Expand Down

0 comments on commit d036567

Please sign in to comment.