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

BO16 - Create an endpoint to list all Sponsorship levels and Sponsors #236

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

bonfry
Copy link

@bonfry bonfry commented Jul 10, 2024

  • Add Partnership and Partner model
  • Add Endpoint for fetching from firestore

Copy link
Contributor

@camillobucciarelli camillobucciarelli left a comment

Choose a reason for hiding this comment

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

Check also if you have the eslint rules enabled, when I checked out the PR code I had a lot of style warnings.

functions/test/api/http/partnership.test.ts Outdated Show resolved Hide resolved
functions/test/api/http/partnership.test.ts Outdated Show resolved Hide resolved
functions/src/api/http/partnership/partnership.route.ts Outdated Show resolved Hide resolved
@bonfry
Copy link
Author

bonfry commented Jul 30, 2024

@camillobucciarelli I updated the code with your suggestions

Copy link
Contributor

@camillobucciarelli camillobucciarelli left a comment

Choose a reason for hiding this comment

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

Also you have to add tests to cover your code.

You can run tests and check the coverage with `pnpm run test:ui'

Comment on lines 9 to 18
fromFirestore: (snapshot: QueryDocumentSnapshot) => {
const data = snapshot.data() as PartnerDoc;
data.id = snapshot.id;

return { ...data };
},
toFirestore: (model: Partner) => {
delete model.id;
return { ...model };
}
Copy link
Contributor

Choose a reason for hiding this comment

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

potresti cambiare anche questo mettendo prima il toFirestrore. It is not necessary but only to standardize converters

Copy link
Author

Choose a reason for hiding this comment

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

I fixed the requested changes and I wrote the test. Have I put on /test directory? For now I put it in /test/partnership.test.ts

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