1
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
{
|
||||
public class CategoryEndpointScheme
|
||||
{
|
||||
public int Priority { get; set; } = 3;
|
||||
public string Prefix { get; set; } = "admin/api";
|
||||
|
||||
public string[] Tags { get; set; } = new[] { "Categories" };
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
{
|
||||
public class CreateCategoryEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class CreateCategoryEndpoint : CategoryEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPost("/categories", Handle).WithRequestValidation<Request>();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
{
|
||||
public class DeleteCategoryEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class DeleteCategoryEndpoint : CategoryEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapDelete("/categories", Handle);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
{
|
||||
public class GetCategoriesEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class GetCategoriesEndpoint : CategoryEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapGet("/categories", Handle);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
{
|
||||
public class GetCategoryEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class GetCategoryEndpoint : CategoryEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapGet("/categories/{id}", Handle);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
namespace Yes.Blog.Endpoints.Admins.Categories
|
||||
{
|
||||
public class UpdateCategoryEndpoint : AdminEndpointScheme, IEndpoint
|
||||
public class UpdateCategoryEndpoint : CategoryEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPut("/categories", Handle).WithRequestValidation<Request>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user