Skip to content
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

Get user location api call does not work properly #175

Open
DorianTe opened this issue Sep 20, 2017 · 1 comment
Open

Get user location api call does not work properly #175

DorianTe opened this issue Sep 20, 2017 · 1 comment

Comments

@DorianTe
Copy link

Whenever i execute this command:

curl -X GET http://localhost:8003/location?group=TESTGROUP&user=dorian

It returns the following information:

{"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.)

@schollz
Copy link
Owner

schollz commented Sep 22, 2017

That's very strange. Would you be able to send me your database? Email to [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants