Hauk
Hauk copied to clipboard
Client errors out when accuracy is not provided
I was playing with the API and I stumbled upon an issue where if you don't include the acc
field in a request the web client errors out.
Comments in post.php
seem to suggest that including acc
should be optional.
// Not all devices report speed and accuracy, but if available, report them
// too.
Steps to reproduce:
curl -X POST -d "pwd=demo&dur=60&int=1" "https://apps.varden.info/demo/hauk/api/create.php"
open share link in browser, copy session ID and paste in place of sessionid
below
curl -X POST -d "sid=sessionid&lat=50&lon=20&time=$(date +%s)" "https://apps.varden.info/demo/hauk/api/post.php"
web client shows
Share expired
This location share has expired.
[Dismiss]
browser console:
TypeError: Cannot read property 'setStyle' of null
at processUpdate (main.js:71)
at main.js:31
at XMLHttpRequest.xhr.onreadystatechange (main.js:14)
Thanks for the report, and sorry for the delay in getting back to you. This appears to be an error on the frontend wherein the map script at one point assumes that all users will have an accuracy value associated with them, even though, as you noted, the accuracy is supposed to be optional. Will make sure this gets fixed ASAP.