-
Notifications
You must be signed in to change notification settings - Fork 489
Get all reviews endpoint returns only first 30 reviews #13
Comments
@panpan291265 You have to go to folder config => blueprint.js => scroll to bottom then uncomment defaultLimit and set it to any number greater than 30. |
Are we allowed to make changes in the blueprint.js file? |
@SundusAshar my guess is that you are not supposed because there may be some intentional mistakes that we should handle in front but if you want to be able to know if the review you just posted has been correctly added to the server then you have to, there's no other choice. |
In fact, we dont't have to modify the blueprints as it is not necessary to fetch all the reviews at once. The API allows us to fetch restaurant-specific reviews this way: Just keep in mind that the same limit applies, thus you can not fetch more than 30 reviews for a single restaurant ID. Which should not be a problem for a small project like this one since nobody is going to add more than 30 reviews per restaurant anyway. |
You can specify URL param
I'll submit a pull request to have this fixed, because I wasted a lot of time because of it. |
* add breakpoints for size beyond phone portrait width * add grid and flex layouts for content blocks beyond assumed default of vertical stacking Resolves: #13
Sails server application comes with a default db containing 10 restaurants and 30 reviews (3 per restaurant).
If you add some more reviews, the get all reviews endpoint (http://localhost:1337/reviews/) returns only the first 30 reviews. If you use the get all reviews for a restaurant endpoint (http://localhost:1337/reviews/?restaurant_id=<restaurant_id>) then the server returns correctlly all the requested restaurant reviews.
The text was updated successfully, but these errors were encountered: