Open kerfootj opened 4 years ago
As a developer, I want the api to use url parameters instead of query parameters when getting and saving information
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>
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
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