32 lines
775 B
C#
32 lines
775 B
C#
using System.Web.Mvc;
|
|
|
|
namespace Disco.Web.Areas.API
|
|
{
|
|
public class APIAreaRegistration : AreaRegistration
|
|
{
|
|
public override string AreaName
|
|
{
|
|
get
|
|
{
|
|
return "API";
|
|
}
|
|
}
|
|
|
|
public override void RegisterArea(AreaRegistrationContext context)
|
|
{
|
|
context.MapRoute(
|
|
"API_Update",
|
|
"API/{controller}/Update/{id}/{key}",
|
|
new { action = "Update" }
|
|
);
|
|
|
|
context.MapRoute(
|
|
"API_default",
|
|
"API/{controller}/{action}/{id}",
|
|
new { id = UrlParameter.Optional },
|
|
new string[] { "Disco.Web.Areas.API.Controllers" }
|
|
);
|
|
}
|
|
}
|
|
}
|