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

#169469778 - Modify Search Fonctionality #43

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

nignanthomas
Copy link
Contributor

@nignanthomas nignanthomas commented Nov 3, 2019

What does this PR do?

Modify Search Finctionality to search by username, not userId and origin/destination with strings.

Description of Task to be completed?

  • Edit validationRequestSearch to search by username and origin/destination=string
  • Create a middleware to search the locations ids matching the search queries
  • Edit managerUserIdField to return the users matching the username in queries

How should this be manually tested?

  • Clone the repository from here
  • Browse to the repo directory
  • navigate to ch-modify-search-169469778 branch
  • Run npm install
  • run sequelize db:migrate
  • run sequelize db:seed:all
  • run npm run dev

To Search Requests

  • If you are logged in as a manager
    Send a GET request to http://localhost:port/api/v1/requests/manager/search?username=thomas&origin=kampala
  • If you are logged in as a requester
    Send a GET request to http://localhost:port/api/v1/requests/username=thomas&destination=lagos

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

#169469778

Screenshots (if appropriate)

Screen Shot 2019-11-03 at 21 11 40

Screen Shot 2019-11-03 at 23 44 30

Questions:

N/A

- edit validationRequestSearch to search by username and origin/destination=string

- create a middleware to search the locations ids matching the search queries

- edit managerUserIdField to return the users matching the username in queries

[Finishes #169469778]
Copy link
Collaborator

@sabin18 sabin18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job @nignanthomas

Copy link
Contributor

@alainmateso alainmateso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Job Thomas!

@nakiwuge nakiwuge merged commit 7504d49 into develop Nov 4, 2019
@nignanthomas nignanthomas deleted the ch-modify-search-169469778 branch November 13, 2019 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants