-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: main
Are you sure you want to change the base?
Conversation
bonfry
commented
Jul 10, 2024
- Add Partnership and Partner model
- Add Endpoint for fetching from firestore
There was a problem hiding this 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.
@camillobucciarelli I updated the code with your suggestions |
There was a problem hiding this 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'
fromFirestore: (snapshot: QueryDocumentSnapshot) => { | ||
const data = snapshot.data() as PartnerDoc; | ||
data.id = snapshot.id; | ||
|
||
return { ...data }; | ||
}, | ||
toFirestore: (model: Partner) => { | ||
delete model.id; | ||
return { ...model }; | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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