Coder Social home page Coder Social logo

Comments (8)

omikulcik avatar omikulcik commented on May 31, 2024 1

I see now. For some reason your url starts with /v1 instead of /api and our middleware determines the collection type with this code const collectionType = url.replace("/api/", "").split("/")[0].split("?")[0]; And since there is no "/api" in your request it will fail to get the correct collectionType and lets the request through.

If you need a hotfix it should be fixed by changing the line 24 of the middleware to const collectionType = url.replace(strapi.config.api.rest.prefix, "").split("/")[0].split("?")[0];

I will also include this into the source code and publish a new version but I will do it tomorrow at the earliest.

from strapi-plugin-location.

korayrubicoda avatar korayrubicoda commented on May 31, 2024 1

ahh sorry i changed the code to /v1 in the instructions when installing postgres
I fixed it, now it works
thank you :)

from strapi-plugin-location.

omikulcik avatar omikulcik commented on May 31, 2024 1

Glad it works :)

from strapi-plugin-location.

omikulcik avatar omikulcik commented on May 31, 2024

Hi @korayrubicoda, is the field in which you store the coordinates also named "coords"? In case the url is constructed wrongly it will return all entries.

from strapi-plugin-location.

korayrubicoda avatar korayrubicoda commented on May 31, 2024

yes cordinates name "coords"
image
image

from strapi-plugin-location.

omikulcik avatar omikulcik commented on May 31, 2024

Oh, you should test on real coordinates from the map because they are stored as geospatial data in the DB. Also try omitting the populate=* but that should not cause any problems. If that does not work I will try replicating this.

from strapi-plugin-location.

korayrubicoda avatar korayrubicoda commented on May 31, 2024

I tested the coordinate and it's correct
and deleted populate=*
image
image
i change url and it's not working
image

from strapi-plugin-location.

omikulcik avatar omikulcik commented on May 31, 2024

Closed by #39

from strapi-plugin-location.

Related Issues (20)

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.