{"message":"Correctly found locations.","success":true,"users":{"dorian":[{"time":"2017-09-20 11:47:22.501935543 +0000 UTC","location":"office","bayes":{"kantine":-0.7071067811865475,"office":0.7071067811865476},"svm":{"kantine":-2.2507614392718738,"office":-0.11128804882262555},"rf":null}],
"ian":[{"time":"2017-09-20 10:42:48.528923721 +0000 UTC","location":"office","bayes":{"kantine":-0.7071067811865475,"office":0.7071067811865476},"svm":{"kantine":-3.235615148872499,"office":-0.04013056694473616},"rf":null}]}}
As you can see it returns all users (there are only 2 users) in the group instead of only user "dorian".
iam not a go-lang pro but i took a dive into the code and think the culprit is the foreach loop in getUserLocations function in api.go. (but then again iam very inexperienced with go-lang so i could be wrong.)
Whenever i execute this command:
curl -X GET http://localhost:8003/location?group=TESTGROUP&user=dorian
It returns the following information:
As you can see it returns all users (there are only 2 users) in the group instead of only user "dorian".
iam not a go-lang pro but i took a dive into the code and think the culprit is the foreach loop in getUserLocations function in api.go. (but then again iam very inexperienced with go-lang so i could be wrong.)