Skip to content

Commit

Permalink
feat(routes): add basic route setup
Browse files Browse the repository at this point in the history
  • Loading branch information
velrest committed Jun 30, 2020
1 parent 9e3ade0 commit 26b57ce
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
19 changes: 18 additions & 1 deletion addon/routes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
import buildRoutes from "ember-engines/routes";

export default buildRoutes(function () {
this.route("scopes", function () {});
this.route("users", function () {
this.route("edit", { path: "/:user_id" }, function () {
this.route("acl");
});
this.route("new");
});
this.route("scopes", function () {
this.route("edit", { path: "/:scope_id" });
this.route("new");
});
this.route("permissions", function () {
this.route("edit", { path: "/:permission_id" });
this.route("new");
});
this.route("roles", function () {
this.route("edit", { path: "/:role_id" });
this.route("new");
});
});
1 change: 0 additions & 1 deletion testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
test_page: "tests/index.html?hidepassed",
disable_watching: true,
launch_in_ci: ["Chrome"],
launch_in_dev: ["Chrome"],
browser_start_timeout: 120,
browser_args: {
Chrome: {
Expand Down
29 changes: 29 additions & 0 deletions tests/dummy/mirage/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@ export default function () {
this.get("/scopes");
this.post("/scopes");
this.get("/scopes/:id");
this.patch("/scopes/:id");
this.put("/scopes/:id");
this.del("/scopes/:id");

this.get("/permissions");
this.post("/permissions");
this.get("/permissions/:id");
this.patch("/permissions/:id");
this.put("/permissions/:id");
this.del("/permissions/:id");

this.get("/users");
this.post("/users");
this.get("/users/:id");
this.patch("/users/:id");
this.put("/users/:id");
this.del("/users/:id");

this.get("/roles");
this.post("/roles");
this.get("/roles/:id");
this.patch("/roles/:id");
this.put("/roles/:id");
this.del("/roles/:id");

this.get("/acls");
this.post("/acls");
this.get("/acls/:id");
this.patch("/acls/:id");
this.put("/acls/:id");
this.del("/acls/:id");
}

0 comments on commit 26b57ce

Please sign in to comment.