This commit is contained in:
2025-05-04 22:11:28 +08:00
parent 09afa239a6
commit b7eb0f9a68
69 changed files with 344 additions and 178 deletions

View File

@@ -0,0 +1,10 @@
namespace Yes.Blog.Endpoints.Admins.Comments
{
public class CommentEndpointScheme
{
public int Priority { get; set; } = 3;
public string Prefix { get; set; } = "admin/api";
public string[] Tags { get; set; } = new[] { "Comments" };
}
}

View File

@@ -1,8 +1,6 @@

namespace Yes.Blog.Endpoints.Admins.Comments
namespace Yes.Blog.Endpoints.Admins.Comments
{
public class DeleteCommentEndpoint : AdminEndpointScheme, IEndpoint
public class DeleteCommentEndpoint : CommentEndpointScheme, IEndpoint
{
public void Map(IEndpointRouteBuilder app) => app.MapDelete("/comments", Handle);

View File

@@ -1,6 +1,6 @@
namespace Yes.Blog.Endpoints.Admins.Comments
{
public class GetCommentsEndpoint : AdminEndpointScheme, IEndpoint
public class GetCommentsEndpoint : CommentEndpointScheme, IEndpoint
{
public void Map(IEndpointRouteBuilder app) => app.MapGet("/comments", Handle);

View File

@@ -1,8 +1,8 @@
namespace Yes.Blog.Endpoints.Admins.Comments
{
public class GetLatestCommentsEndpoint : AdminEndpointScheme, IEndpoint
public class GetLatestCommentsEndpoint : CommentEndpointScheme, IEndpoint
{
public void Map(IEndpointRouteBuilder app) => app.MapGet("/comments/Latest", Handle);
public void Map(IEndpointRouteBuilder app) => app.MapGet("/comments/latest", Handle);

View File

@@ -1,6 +1,6 @@
namespace Yes.Blog.Endpoints.Admins.Comments
{
public class UpdateCommentEndpoint : AdminEndpointScheme, IEndpoint
public class UpdateCommentEndpoint : CommentEndpointScheme, IEndpoint
{
public void Map(IEndpointRouteBuilder app) => app.MapPut("/comments", Handle);