Permalink
Browse files

Updates to routes

  • Loading branch information...
1 parent 1e9c3d7 commit 977a7de2165fb4b0aeaad21fae15c024c9a0524f @tomasmcguinness committed Jul 9, 2012
@@ -14,24 +14,20 @@ public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
+ ////api/version/devices/deviceLibraryIdentifier/registrations/passTypeIdentifier/serialNumber
+ //routes.MapHttpRoute(
+ // name: "Registration",
+ // routeTemplate: "api/{version}/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier}/{serialNumber}",
+ // defaults: new { Controller = "Registration" });
+
///api/v1/devices/d754ba022bd37181fed36ead4e7cf5d8/registrations/pass.tomasmcguinness.com
routes.MapHttpRoute(
name: "PassFetchUpdatedPasses",
routeTemplate: "api/{version}/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier}",
- defaults: new { Controller = "PassRegistration" }
+ defaults: new { Controller = "PassRegistration", Action = "Get" }
);
- //https://webServiceURL/version/devices/deviceLibraryIdentifier/registrations/passTypeIdentifier/serialNumber
- routes.MapHttpRoute(
- name: "Registration",
- routeTemplate: "{version}/devices/{deviceLibraryIdentifier}/registrations/{passTypeIdentifier}{serialNumber}",
- defaults: new { Controller = "Registration" });
- routes.MapHttpRoute(
- name: "DefaultApi",
- routeTemplate: "api/{controller}/{id}",
- defaults: new { id = RouteParameter.Optional }
- );
routes.MapRoute(
name: "Default",
@@ -80,7 +80,7 @@ public ActionResult StoreCard()
request.AddBarCode("01927847623423234234", BarcodeType.PKBarcodeFormatPDF417, "UTF-8", "01927847623423234234");
request.AuthenticationToken = "vxwxd7J8AlNNFPS8k0a0FfUFtq0ewzFdc";
- request.WebServiceUrl = "http://192.168.1.89:81/api/";
+ request.WebServiceUrl = "http://192.168.2.26:81/api/";
Pass generatedPass = generator.Generate(request);
return new FileContentResult(generatedPass.GetPackage(), "application/vnd.apple.pkpass");
Binary file not shown.

0 comments on commit 977a7de

Please sign in to comment.