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

[#174644239] - Fix GetServices returns all services #69

Merged
merged 6 commits into from
Sep 7, 2020

Conversation

AleDore
Copy link
Contributor

@AleDore AleDore commented Sep 4, 2020

This PR includes a fix to GetServices that now returns all services, instead of a subset.
This also includes specs update on GetServices return type.

Comment on lines 87 to 92
const reducedResults = results.reduce((prev, curr) => {
return {
...prev,
...curr
};
}, {});
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the purpose of this code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

results' type is {}[]. I've used reduce to flatten results into {}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nevermind, changed implementation in 85a8305

@AleDore AleDore requested a review from gunzip September 4, 2020 14:45
@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2020

Codecov Report

Merging #69 into master will decrease coverage by 0.49%.
The diff coverage is 79.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
- Coverage   86.62%   86.13%   -0.50%     
==========================================
  Files          39       39              
  Lines        1249     1255       +6     
  Branches       88       97       +9     
==========================================
- Hits         1082     1081       -1     
- Misses        166      172       +6     
- Partials        1        2       +1     
Impacted Files Coverage Δ
utils/conversions.ts 82.69% <50.00%> (-5.95%) ⬇️
ExtractUserDataActivity/handler.ts 76.38% <68.57%> (-1.63%) ⬇️
GetServices/handler.ts 84.84% <94.73%> (-0.34%) ⬇️
CreateService/handler.ts 85.18% <100.00%> (ø)
GetService/handler.ts 86.95% <100.00%> (ø)
GetUserDataProcessingActivity/handler.ts 90.90% <100.00%> (-0.21%) ⬇️
SetUserDataProcessingStatusActivity/handler.ts 89.47% <100.00%> (+1.10%) ⬆️
UpdateService/handler.ts 89.18% <100.00%> (-1.29%) ⬇️
UploadServiceLogo/handler.ts 84.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce57f1a...80f6c0a. Read the comment docs.

@pagopa-github-bot
Copy link
Contributor

Affected stories

  • 🌟 #174644239: Come SAS, voglio poter ricevere la lista di tutti i servizi invece di un solo sottoinsieme

Generated by 🚫 dangerJS

@gunzip gunzip merged commit e7afdda into master Sep 7, 2020
@gunzip gunzip deleted the 174644239_fix_GetServices branch September 7, 2020 07:57
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