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

SAA-1536 remove unused deprecated endpoint GET /activities/{ID}, this is no longer used. #776

Closed

Conversation

matt-crowson-moj
Copy link
Contributor

@matt-crowson-moj matt-crowson-moj commented Feb 8, 2024

This removes the unused deprecated endpoint GET /activities/{ID}.

All calls that require to get the activity by its ID should go through the filtered endpoint GET /activities/{ID}/filtered.

I have checked Application Insights and cannot see this endpoint used anymore.

Goes with this PR here.

@matt-crowson-moj matt-crowson-moj force-pushed the task/SAA-1536-remove-unused-deprecated-endpoint branch from d668580 to eb05c2a Compare February 8, 2024 13:15

fun getActivityById(activityId: Long): ModelActivity {
val activity = activityRepository.findById(activityId)
.orElseThrow { EntityNotFoundException("Activity $activityId not found") }
checkCaseloadAccess(activity.prisonCode)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also now doing case load check.

@matt-crowson-moj matt-crowson-moj marked this pull request as ready for review February 8, 2024 13:28
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (74c57c9) 86.96% compared to head (1714d82) 87.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #776      +/-   ##
============================================
+ Coverage     86.96%   87.00%   +0.03%     
- Complexity     3477     3478       +1     
============================================
  Files           363      363              
  Lines         12072    12070       -2     
  Branches       1008     1009       +1     
============================================
+ Hits          10499    10501       +2     
+ Misses         1106     1102       -4     
  Partials        467      467              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@smcveigh941 smcveigh941 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems an odd name/url for the "filtered" endpoint now that the original is gone, but LGTM

@timoj58 timoj58 closed this Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants