devscollab/skill-board-api

Sort Api

Closed this issue · 8 comments

Sort Api for ascending or descending students listing based on student rating

note: needs further discussion

Can you elaborate on how you want it?

Basically you need a route to sort the students based on rating and return it which is in your student schema

can you please assign this issue to me ?

Basically you need a route to sort the students based on rating and return it which is in your student schema

That is a way but a much-optimized one would be doing something like having sort attributes so that we can do dymanic sorting.

Basically you need a route to sort the students based on rating and return it which is in your student schema

That is a way but a much-optimized one would be doing something like having sort attributes so that we can do dymanic sorting.

You can also pass that attribute into the query: https://docs.mongodb.com/manual/reference/method/cursor.sort/#cursor.sort

Basically you need a route to sort the students based on rating and return it which is in your student schema

That is a way but a much-optimized one would be doing something like having sort attributes so that we can do dymanic sorting.

You can also pass that attribute into the query: https://docs.mongodb.com/manual/reference/method/cursor.sort/#cursor.sort

We were planning to do the same.

  1. create an endpoint that can send the sorted data
  2. require the attribute from the query
  3. apply the query on the database
  4. return the response

The attributes that we will be using to sort the student user are yet to be discussed with our team. We will update the issue asap, then you may start working on it. For now, you may sort the student users based on the rating attribute from the schema and the "rating" attribute must be sent to the server as part of the query string.

@Aditya-Dawadikar
Can I take this up?

Stale issue message