💥 Add /api prefix for json endpoints with redirect

This commit is contained in:
2025-07-10 14:18:02 +08:00
parent 1f2cdb146d
commit fc6edd7378
43 changed files with 217 additions and 41 deletions

View File

@ -0,0 +1,22 @@
@page "/posts/{PostId:guid}"
@model DysonNetwork.Sphere.Pages.Posts.PostDetailModel
@{
ViewData["Title"] = Model.Post?.Title + " | Solar Network";
}
<div class="container mx-auto p-4">
@if (Model.Post != null)
{
<h1 class="text-3xl font-bold mb-4">@Model.Post.Title</h1>
<p class="text-gray-600 mb-2">Created at: @Model.Post.CreatedAt</p>
<div class="prose lg:prose-xl">
<p>@Model.Post.Content</p>
</div>
}
else
{
<div class="alert alert-error">
<span>Post not found.</span>
</div>
}
</div>