Skip to content

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

@kerfootj

Description

@kerfootj

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions