kossiitkgp/KWoC-Backend

[v2] `/mentor/all/` Route

Closed this issue · 2 comments

  1. Add a /mentor/all/ (GET, with login) route to fetch a list of all mentors' basic information.
  2. Add tests for this route.
  • In v1, it does not return the mentor who makes the request. Do we have to do that here as well?
    err := db.Select([]string{"Name", "Username"}).Not("username", mentor).Find(&mentors).Error
  • In v1, it does not return the mentor who makes the request. Do we have to do that here as well?
    err := db.Select([]string{"Name", "Username"}).Not("username", mentor).Find(&mentors).Error

I guess we can return it. The frontend should handle the exclusion imo.