@@ -34,7 +34,7 @@ $ lb4 controller
34
34
Controller TodoList was created in src/controllers/
35
35
```
36
36
37
- And voilà! We now have a set of basic APIs for todo-lists just like that!
37
+ And voilà! We now have a set of basic APIs for todo-lists, just like that!
38
38
39
39
### Create TodoList's Todo controller
40
40
@@ -66,14 +66,13 @@ export class TodoListTodoController {
66
66
}
67
67
```
68
68
69
- With this, we're now ready to add in some routes for our todo requests. To call
70
- the CRUD methods on a todo-list's todo items, we'll first need to create a
71
- constrained ` TodoRepository ` . We can achieve this by using our repository
72
- instance's ` todos ` factory function that we defined earlier in
73
- ` TodoListRepository ` .
69
+ We're now ready to add in some routes for our todo requests. To call the CRUD
70
+ methods on a todo-list's todo items, we'll first need to create a constrained
71
+ ` TodoRepository ` . We can achieve this by using our repository instance's ` todos `
72
+ factory function that we defined earlier in ` TodoListRepository ` .
74
73
75
- The ` POST ` request from ` /todo-lists/{id}/todos ` should look something like
76
- this :
74
+ The ` POST ` request from ` /todo-lists/{id}/todos ` should look similar to the
75
+ following request :
77
76
78
77
#### src/controllers/todo-list-todo.controller.ts
79
78
@@ -163,7 +162,7 @@ Here are some new requests you can try out:
163
162
contains property ` todoListId ` with the ID from before.
164
163
- ` GET /todos/{id}/todos ` and see if you get the todo you created from before.
165
164
166
- And there you have it! You now have the power to define API for related models!
165
+ And there you have it! You now have the power to define APIs for related models!
167
166
168
167
### Navigation
169
168
0 commit comments