-
Notifications
You must be signed in to change notification settings - Fork 6
/
Routes.cs
32 lines (29 loc) · 937 Bytes
/
Routes.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Orchard.Mvc.Routes;
using Orchard.WebApi.Routes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace Morphous.TokenAuth {
public class HttpRoutes : IHttpRouteProvider {
public void GetRoutes(ICollection<RouteDescriptor> routes) {
foreach (var routeDescriptor in GetRoutes()) {
routes.Add(routeDescriptor);
}
}
public IEnumerable<RouteDescriptor> GetRoutes() {
return new[] {
new HttpRouteDescriptor {
Priority = 5,
RouteTemplate = "api/account/{action}/{id}",
Defaults = new {
area = "Morphous.TokenAuth",
controller = "Account",
id = RouteParameter.Optional
}
}
};
}
}
}