💥 Add /api prefix for json endpoints with redirect
This commit is contained in:
22
DysonNetwork.Sphere/Pages/Posts/PostDetail.cshtml
Normal file
22
DysonNetwork.Sphere/Pages/Posts/PostDetail.cshtml
Normal 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>
|
Reference in New Issue
Block a user