Skip to content

Commit

Permalink
Clarifying some generated routes
Browse files Browse the repository at this point in the history
  • Loading branch information
twof authored Oct 27, 2018
1 parent 5e243fe commit 19a886c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ POST /user
PUT /user/:id
DELETE /user/:id
GET /user/:id/todo
GET /user/:id/todo/:id
POST /user/:id/todo
PUT /user/:id/todo/:id
DELETE /user/:id/todo/:id
GET /user/:id/todo // returns all Todos belonging to the User with :id
GET /user/:id/todo/:id // returns the Todo with :id belonging to the User with :id
POST /user/:id/todo // creates a new Todo belonging to the User with :id
PUT /user/:id/todo/:id // updates the Todo with :id belonging to the User with :id
DELETE /user/:id/todo/:id // deletes the Todo with :id belonging to the User with :id
```

within the supplied closure, you can also expose routes for related `Parent`s and `Sibling`s
Expand All @@ -112,11 +112,11 @@ try router.crud(register: Todo.self, .except([.create, .delete])) { controller i
results in

```
PUT /todo/int
GET /todo/int
PUT /todo/:id
GET /todo/:id
GET /todo
GET /todo/int/tag/int
GET /todo/:id/tag/:id
```

### Future features
Expand Down

0 comments on commit 19a886c

Please sign in to comment.