VikeLabs / scheduler-back-end

Server for UVic scheduler project
https://uvic-scheduler-server.herokuapp.com/
GNU General Public License v3.0
1 stars 0 forks source link

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

Open kerfootj opened 4 years ago

kerfootj commented 4 years ago

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