You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/13/en/part13b.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -231,13 +231,13 @@ The current code for the application is in its entirety on [GitHub](https://gith
231
231
232
232
<divclass="tasks">
233
233
234
-
### Tasks 13.5.-13.7.
234
+
### Exercises 13.5.-13.7.
235
235
236
-
#### Task 13.5.
236
+
#### Exercise 13.5.
237
237
238
238
Change the structure of your application to match the example above, or to follow some other similar clear convention.
239
239
240
-
#### Task 13.6.
240
+
#### Exercise 13.6.
241
241
242
242
Also, implement support for changing the number of a blog's likes in the application, i.e. the operation
243
243
@@ -251,7 +251,7 @@ The updated number of likes will be relayed with the request:
251
251
}
252
252
```
253
253
254
-
#### Task 13.7.
254
+
#### Exercise 13.7.
255
255
256
256
Centralize the application error handling in middleware as in [part 3](/en/part3/saving_data_to_mongo_db#moving-error-handling-into-middleware). You can also enable middleware [express-async-errors](https://github.com/davidbanham/express-async-errors) as we did in [part 4](/en/part4/testing_the_backend#eliminating-the-try-catch).
257
257
@@ -693,9 +693,9 @@ Instead we can achieve the same with this. Using one of the two methods is neces
693
693
694
694
<divclass="tasks">
695
695
696
-
### Tasks 13.8.-13.12.
696
+
### Exercises 13.8.-13.12.
697
697
698
-
#### Task 13.8.
698
+
#### Exercise 13.8.
699
699
700
700
Add support for users to the application. In addition to ID, users have the following fields:
701
701
@@ -738,7 +738,7 @@ Expand the application so that the current logged-in user identified by a token
738
738
739
739
Make deletion of a blog only possible for the user who added the blog.
740
740
741
-
#### Task 13.12.
741
+
#### Exercise 13.12.
742
742
743
743
Modify the routes for retrieving all blogs and all users so that each blog shows the user who added it and each user shows the blogs they have added.
744
744
@@ -963,9 +963,9 @@ The current code for the application is in its entirety on [GitHub](https://gith
963
963
964
964
<divclass="tasks">
965
965
966
-
### Tasks 13.13.-13.16
966
+
### Exercises 13.13.-13.16
967
967
968
-
#### Task 13.13.
968
+
#### Exercise 13.13.
969
969
970
970
Implement filtering by keyword in the application for the route returning all blogs. The filtering should work as follows
971
971
-_GET /api/blogs?search=react_ returns all blogs with the search word <i>react</i> in the <i>title</i> field, the search word is case-insensitive
@@ -982,7 +982,7 @@ _GET /api/blogs?search=jami_ returns blogs with the search word <i>jami</i> in t
982
982
983
983
Modify the blogs route so that it returns blogs based on likes in descending order. Search the [documentation](https://sequelize.org/master/manual/model-querying-basics.html) for instructions on ordering,
984
984
985
-
#### Task 13.16.
985
+
#### Exercise 13.16.
986
986
987
987
Make a route for the application _/api/authors_ that returns the number of blogs for each author and the total number of likes. Implement the operation directly at the database level. You will most likely need the [group by](https://sequelize.org/master/manual/model-querying-basics.html#grouping) functionality, and the [sequelize.fn](https://sequelize.org/master/manual/model-querying-basics.html#specifying-attributes-for-select-queries) aggregator function.
0 commit comments