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

Back-end: Create route for fetching users list by ids #317

Closed
alonttal opened this issue Apr 23, 2018 · 6 comments
Closed

Back-end: Create route for fetching users list by ids #317

alonttal opened this issue Apr 23, 2018 · 6 comments

Comments

@alonttal
Copy link
Collaborator

No description provided.

@alonttal alonttal added this to the Mid Semester POC milestone Apr 23, 2018
@alonttal alonttal added this to Backlog in Roommates via automation Apr 23, 2018
@OrAbramovich
Copy link
Collaborator

Estimated time: 0.5 hour.

OrAbramovich added a commit that referenced this issue Apr 27, 2018
Testing: Back-end: Modified current & created new tests for fetching users list by ids

I modified the GET /users/:id route to support single value or array as id parameter. The returned value is a JSON map that its properties are the ids and the value for each one is the relevant user document.
The commit includes tests modification and new tests.

#317, #337
@OrAbramovich
Copy link
Collaborator

Actual time: 0.5 hour.

@OrAbramovich
Copy link
Collaborator

@alonttal,
As agreed - modified the GET /users/:id route to support single value or array as id parameter. The returned value is a JSON map that its properties are the ids and the value for each one is the relevant user document.

Please make the relevant changes in front-end.

BTW - it seems that the received value for array is a string separated by ',' and not an array object.

@OrAbramovich
Copy link
Collaborator

Done.

Roommates automation moved this from Backlog to Done Apr 27, 2018
@OrAbramovich OrAbramovich changed the title Create route for fetching users list by ids Back-end: Create route for fetching users list by ids Apr 27, 2018
@alonttal
Copy link
Collaborator Author

reopened.
@OrAbramovich
I've looked at the code. The reason you get the ids as a long string is due to the use of "params". In such cases, query is more appropriate. I'll change that and modify the test accordingly.
Estimated time: 1 hour.

@alonttal alonttal reopened this Apr 28, 2018
Roommates automation moved this from Done to Backlog Apr 28, 2018
alonttal added a commit that referenced this issue Apr 28, 2018
	 - Changed the id list to be query instead of params.
	 - Moved the "if" statement to check length before converting
	 the array to map.
	 - fixed the GET /users route accordingly
Issue: #317
@alonttal
Copy link
Collaborator Author

I've pushed the change.
closed

Roommates automation moved this from Backlog to Done Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roommates
  
Done
Development

No branches or pull requests

2 participants