Comments (8)
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.
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.
Glad it works :)
from strapi-plugin-location.
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.
from strapi-plugin-location.
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.
I tested the coordinate and it's correct
and deleted populate=*
i change url and it's not working
from strapi-plugin-location.
Closed by #39
from strapi-plugin-location.
Related Issues (20)
- No able to see the location custom type HOT 2
- Geolocation shape field
- Reverse geocoding HOT 8
- GraphQL support HOT 3
- 'All changes made will be lost' warning upon exiting unedited collection item HOT 1
- GeoJSON format support HOT 1
- Map tiles do not load due to Content Security Policy HOT 2
- Error: Undefined attribute level operator 0 HOT 6
- Errors in Plugin Build HOT 1
- Location not working if data came from populated (need a help) HOT 4
- column "XXX_geom" of relation "XXX" does not exist HOT 3
- invalid input syntax for type double precision: ""13.537340924817212"" HOT 2
- Version 1.2.4 npm package contains uncompiled TypeScript HOT 1
- TypeScript Examples in Readme.md
- Error installing plugin Cannot find module './server' HOT 17
- Search issues: Invalid parameter 0
- _geom fields are geometry, but queries always cast to geography, preventing any DB indices HOT 1
- Add a contributors guide
- Location search is not working with entityService.findMany 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 strapi-plugin-location.