Ejemplo n.º 1
0
  public static Result javascriptRoutes() {
    response().setContentType("text/javascript");
    return ok(
        Routes.javascriptRouter(
            "jsRoutes",

            // Routes for Projects
            controllers.routes.javascript.SoundProjects.add(),
            controllers.routes.javascript.SoundProjects.delete()));
  }
Ejemplo n.º 2
0
 public static Result routeAndCall(
     Class<? extends Routes> router, FakeRequest fakeRequest, long timeout) {
   try {
     Routes routes =
         (Routes)
             router
                 .getClassLoader()
                 .loadClass(router.getName() + "$")
                 .getDeclaredField("MODULE$")
                 .get(null);
     if (routes.routes().isDefinedAt(fakeRequest.getWrappedRequest())) {
       return invokeHandler(
           routes.routes().apply(fakeRequest.getWrappedRequest()), fakeRequest, timeout);
     } else {
       return null;
     }
   } catch (RuntimeException e) {
     throw e;
   } catch (Throwable t) {
     throw new RuntimeException(t);
   }
 }
Ejemplo n.º 3
0
 public Result jsRoutes() {
   return ok(Routes.javascriptRouter(
           "jsRoutes", controllers.routes.javascript.Signup.unverified()))
       .as("text/javascript");
 }
Ejemplo n.º 4
0
 public static Result jsRoutes() {
   return ok(Routes.javascriptRouter(
           "jsRoutes", controllers.routes.javascript.Signup.forgotPassword()))
       .as("text/javascript");
 }