-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help Wanted]: Location Template not being applied #1420
Comments
You likely have previously recorded locations in the plugin's database. Destroy them with The plugin renders the template once then inserts the rendered data into SQLIte. |
Thank you very much for your answer.
Can i provide some additional information or maybe more code snippets which could help you identify what is going on? If so, please share - and i will upload it as fast as i can. |
I suggest you log the received json at your server and find verify you’re receiving the format you’re expecting. |
When something unusual occurs, the first thing to do is fetch the plug-in’s log database. See wiki “Debugging” and learn to use method .emailLog. |
Required Reading
Plugin Version
4.16.6
Mobile operating-system(s)
What do you require assistance about?
Hello! Have been connecting this SDK to my application for a few days and got stuck at one point.
I need to send some of the data which is being captured by SDK to my backend in a specific format.
After reading the documentation properly i've found that there is a "locationTemplate" object which can do what i need.
So, my backend is waiting for this json in body request:
Snippet of my location template will be in a code section but to be sure i'll write it here as well:
{"lat":<%= latitude %>,"lon":<%= longitude %>}
The thing is - when i open the application everything loads fine except for the data which is being sent to backend is not formatted to location template but sent as raw object (with all the objects that sdk can capture (as far as i understand))
When i debug i can see that backend gets the request but since the format is wrong i get status 400 with my backend error:
{"status":"error","errors":{"lat":["This field is required."],"lon":["This field is required."]}}
[Optional] Plugin Code and/or Config
[Optional] Relevant log output
The text was updated successfully, but these errors were encountered: