feat(SGE): API Rebase to 10.0.x #82
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request is a complete rebase of the Staff Grant Extension (SGE) API functionality introduced in #77. The initial feature was built on
9.x, and this PR migrates the feature to the new10.0.xdevelopment branch.All credit for development of the feature API goes to @samindiii and @SahiruWithanage.
Sister branches
Run OnTrack with the latest version of these branches to recreate the environment.
Sister Pull Requests
Repo cleanup
Merging this PR should be followed by closing the following open PRs with a comment that they have been merged into
10.0.x:Type of change
How Has This Been Tested?
Test A
While the development container is running, connect and run
rails testfrom the directory/workspace/doubtfire-api. This runs all unit tests. For the last successful GitHub Action run of this branch, see here.Test B
To strictly test the API, head to localhost's API docs while your Docker server is running.
Open "auth : Operations about auths" and go to "POST /api/auth". Enter the following JSON for the
postApiAuthvalue:{"username": "aconvenor", "password":"password"}Then click "Try it out!". From the response, grab the
auth_tokenvalue.Open "units : Operations about units" further down the page then go to "POST /api/units/{unit_id}/staff-grant-extension". Enter the following values for each parameter:
unit_id: 1Username: aconvenorAuth_token: (The one you received from POST /api/auth)postApiUnitsUnitIdStaffGrantExtension:{ "student_ids": [ 24 ], "task_definition_id": 1, "weeks_requested": 1, "comment": "string" }You should receive a "
successful" result in the Response Body.Checklist: