using StopShopping.Services; using StopShopping.Services.Models.Resp; namespace StopShopping.Api.Routes; public static class Category { public static RouteGroupBuilder MapCategory(this RouteGroupBuilder routes) { routes.MapGet("/category/list", GetTree) .WithTags(OpenApiTags.分类.ToString()); return routes; } private static ApiResponse> GetTree( ICategoryService categoryService ) { return categoryService.GetCategoriesTree(); } }