Comments (5)
@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.
It should work
from mws-restaurant-stage-3.
Are we allowed to make changes in the blueprint.js file?
from mws-restaurant-stage-3.
@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.
from mws-restaurant-stage-3.
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:
http://localhost:1337/reviews/?restaurant_id=<restaurant_id>
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.
from mws-restaurant-stage-3.
You can specify URL param limit
with REST queries. For example, "-1" returns all results, or "20" limits to 20. This overrides the defaultLimit
value in blueprint.js
http://localhost:1337/reviews?limit=-1
I'll submit a pull request to have this fixed, because I wasted a lot of time because of it.
from mws-restaurant-stage-3.
Related Issues (9)
- Project ported to Sails v1
- Minor issue in documentation HOT 1
- Get all reviews endpoint only returns original 30 reviews HOT 1
- Any chance of a PUT endpoint for restaurants? HOT 1
- The server does not update posted reviews at "localhost:1337/reviews/" HOT 3
- Favourites endpoint writes incorrectly HOT 1
- Inconsistent formatting in default DB values
- Difference in dataparsing after creating review HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mws-restaurant-stage-3.