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

Update the route to save data from query to url parmas #14

Open
1 task
kerfootj opened this issue Feb 3, 2020 · 0 comments
Open
1 task

Update the route to save data from query to url parmas #14

kerfootj opened this issue Feb 3, 2020 · 0 comments
Assignees
Labels
feature New feature or request good first issue Good for newcomers

Comments

@kerfootj
Copy link
Contributor

kerfootj commented Feb 3, 2020

User Story

As a developer, I want the api to use url parameters instead of query parameters when getting and saving information

Description

Change the router.get and router.post to use query params instead of query parmas.

query params are the form:
www.example.com/path?query=something

url params are the form:
www.example.com/path/<thing>/<something>

Additional Details

To get course information in a semester the route should be:
domain_name.com/courses/<term>

To search course information in a single semester use:
domain_name.com/courses/<term>?search=<search>

To get information about a department the route should be:
domain_name.com/courses/<term>/<subject>

To get information about a single course the route should be:
domain_name.com/courses/<term>/<subject>/<code>

See:
https://stackoverflow.com/questions/20089582/how-to-get-a-url-parameter-in-express

Acceptance Criteria

  • When course information can be obtained using url parms
@kerfootj kerfootj added feature New feature or request good first issue Good for newcomers labels Feb 3, 2020
@tolkamps1 tolkamps1 self-assigned this Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants