try rewirte of all backoffice controllers to ApiControllers

This commit is contained in:
2020-10-27 15:47:23 +01:00
parent edfb6ec2e5
commit 6eb81a5eeb
37 changed files with 315 additions and 354 deletions
+15 -15
View File
@@ -40,21 +40,21 @@ namespace zero.Web
builder.UseEndpoints(endpoints =>
{
// setup route
endpoints.MapControllerRoute(
name: "setup",
pattern: path + "/setup",
defaults: new
{
controller = "Setup",
action = "Index"
}
);
//endpoints.MapControllerRoute(
// name: "setup",
// pattern: path + "/setup",
// defaults: new
// {
// controller = "ZeroSetup",
// action = "Index"
// }
//);
// routes for API
endpoints.MapControllerRoute(
name: "api",
pattern: path + "/api/{controller}/{action}/{id?}"
);
//// routes for API
//endpoints.MapControllerRoute(
// name: "api",
// pattern: path + "/api/{controller}/{action}/{id?}"
//);
if (devPath != null)
{
@@ -62,7 +62,7 @@ namespace zero.Web
}
// fallbacks for SPA
endpoints.MapFallbackToController(path + "/{**path}", "Index", "Index");
endpoints.MapFallbackToController(path + "/{**path}", "Index", "ZeroBackoffice");
});
});