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

Implement mint legacy api endpoints #2201

Merged
merged 8 commits into from
May 31, 2024

Conversation

alejandro-bulgaris-qcif
Copy link
Contributor

There is currently a harvest endpoint defined which is quite similar but not exactly the same as the legacy Mint API. For future integrations we will push users towards the new endpoint but to allow a smooth transition we will need to provide backwards compatibility with the Mint API.

Copy link

codecov bot commented May 30, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 53.46%. Comparing base (cd9f7c4) to head (afb0182).

Files Patch % Lines
...ipt/api/controllers/webservice/RecordController.ts 50.98% 18 Missing and 7 partials ⚠️
typescript/api/services/ReportsService.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2201      +/-   ##
===========================================
+ Coverage    53.24%   53.46%   +0.22%     
===========================================
  Files          173      173              
  Lines         8266     8278      +12     
  Branches      1162     1166       +4     
===========================================
+ Hits          4401     4426      +25     
+ Misses        3421     3388      -33     
- Partials       444      464      +20     
Flag Coverage Δ
backend-bruno 45.82% <50.00%> (+0.37%) ⬆️
backend-mocha 49.67% <50.00%> (+0.27%) ⬆️
frontend-app-config 97.87% <ø> (ø)
frontend-core-lib 52.41% <ø> (ø)
frontend-dashboard 88.07% <ø> (ø)
frontend-export 100.00% <ø> (ø)
frontend-local-auth 100.00% <ø> (ø)
frontend-manage-roles 63.33% <ø> (ø)
frontend-manage-users 59.81% <ø> (ø)
frontend-report 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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


tests {

test("Status code is 200", function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add some tests that check the response body is structured correctly?

config/routes.js Outdated
action: 'legacyHarvest',
csrf: false
},
'get /:branding/:portal/api/mint/harvest/search': {
Copy link
Contributor

Choose a reason for hiding this comment

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

We only need the ingest harvest. Search will be performed with existing endpoints already covered in the first work package. Future work package will cover getting the form components that search legacy Mint to be able to find the records inside ReDBox.

@@ -137,6 +137,7 @@ export module Services {
searchString = ` AND (${queryString})`;
}

//TODO instead of call external mint perform an Ajax call to ReDBOx or directly serach in the database for records or in the solr index ???
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the TODO. I'm expecting this method will be left untouched when we search for records within ReDBox

@andrewbrazzatti andrewbrazzatti merged commit 45a3b66 into develop May 31, 2024
6 of 7 checks passed
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.

2 participants