Giter Club home page Giter Club logo

Comments (5)

hallya avatar hallya commented on May 31, 2024

@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.

SundusAshar avatar SundusAshar commented on May 31, 2024

Are we allowed to make changes in the blueprint.js file?

from mws-restaurant-stage-3.

hallya avatar hallya commented on May 31, 2024

@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.

bambooka avatar bambooka commented on May 31, 2024

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.

anthumchris avatar anthumchris commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.