1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
namespace Yes.Blog.Endpoints.Admins.Pages
|
||||
{
|
||||
public class CreatePageEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class CreatePageEndpoint : PageEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPost("/pages", Handle).WithRequestValidation<Request>();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Yes.Blog.Endpoints.Admins.Pages
|
||||
{
|
||||
public class DeletePageEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class DeletePageEndpoint : PageEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapDelete("/pages", Handle);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Yes.Blog.Endpoints.Admins.Pages
|
||||
{
|
||||
public class GetPageEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class GetPageEndpoint : PageEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapGet("/pages/{id}", Handle);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
|
||||
namespace Yes.Blog.Endpoints.Admins.Pages
|
||||
namespace Yes.Blog.Endpoints.Admins.Pages
|
||||
{
|
||||
public class GetPagesEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class GetPagesEndpoint : PageEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapGet("/pages", Handle);
|
||||
|
||||
|
||||
10
Yes.Blog/Endpoints/Admins/Pages/PageEndpointScheme.cs
Normal file
10
Yes.Blog/Endpoints/Admins/Pages/PageEndpointScheme.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Yes.Blog.Endpoints.Admins.Pages
|
||||
{
|
||||
public class PageEndpointScheme
|
||||
{
|
||||
public int Priority { get; set; } = 3;
|
||||
public string Prefix { get; set; } = "admin/api";
|
||||
|
||||
public string[] Tags { get; set; } = new[] { "Pages" };
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Yes.Blog.Endpoints.Admins.Pages
|
||||
{
|
||||
public class UpdatePageEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class UpdatePageEndpoint : PageEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPut("/pages", Handle).WithRequestValidation<Request>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user