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

issue #48 Part 1– Returns information about the centers of organizations #26

Merged
merged 5 commits into from
Sep 3, 2023

Conversation

paschalidi
Copy link
Collaborator

@paschalidi paschalidi commented Sep 1, 2023

Part 1 of MentorsWithoutBorders/mwb-partners-admin#48

Description

The goal of this is to return the centers and their information for either a specific partner/organization or all of the organizations. The user can filter by date, passing the query params fromDate, toDate.

To test this locally I would suggest to add some rows in the organizations_centers table, here is what I have added

INSERT INTO "public"."organizations_centres" ("id", "name", "address", "organization_id") VALUES
('00a6fa25-df29-4701-9077-557932591764', 'FundLife Center', '123 Rizal Avenue, Barangay 678, Manila, Metro Manila, 1003, Philippines', 'd0b45a28-3640-4867-ad68-faf1c09b3983'),
('00a6fa25-df29-4701-9077-557932591768', 'Education for All Children Center', '678 Moi Avenue, Nairobi Central, Nairobi, 00100, Kenya', '82360ca6-ce95-45f6-a0e3-1c846ee5616b'),
('00a6fa25-df29-4701-9077-557932591767', 'Toptal Center', 'Kurfürstendamm 123, Charlottenburg, 10711 Berlin, Germany', 'd4a4f7c2-3257-40c3-8ea7-771a83355990'),
('00a6fa25-df29-4701-9077-557932591769', 'Anchor of Hope Center', '12 Independence Avenue, Osu, Accra, Greater Accra Region, Ghana', 'ca920041-e697-4588-a47b-1bdb2cd60528'),
('00a6fa25-df29-4701-9077-557932591780', 'Literacy Center', 'C-1/2, Rajpath Area, Connaught Place, New Delhi, Delhi 110001, India', '572f4822-bccd-4b44-b48b-1b958bf1e052') ;

To test it now on postman I would try the following endpoints:

{{url}}/partners/dashboard/organization-centers-with-students?fromDate=2023-8-19%2010:00:00%2B0
{{url}}/partners/ca920041-e697-4588-a47b-1bdb2cd60528/dashboard/organization-centers-with-students?fromDate=2023-08-19%2010:00:00%2B0

where url is localhost:4000/api/v1/ for me

Next steps

On the part 2 of this ticket I will add an endpoint which will return the information of all the students of a specific organization with The following details will be provided for each student in the response:

  • full name
  • organization name
  • link to the last video testimonial

@paschalidi paschalidi changed the title Returns information about the centers of organizations issue #48 – Returns information about the centers of organizations Sep 1, 2023
@paschalidi paschalidi changed the title issue #48 – Returns information about the centers of organizations issue #48 Part 1– Returns information about the centers of organizations Sep 1, 2023
@paschalidi paschalidi requested review from a team, edmondpr, jfmdev, ayushpoddar, leonkudzai, bojovicivan, githubscientist and surenabrahamyan and removed request for a team September 1, 2023 23:16
server.ts Outdated Show resolved Hide resolved
server.ts Outdated Show resolved Hide resolved
server.ts Outdated Show resolved Hide resolved
@paschalidi paschalidi requested a review from edmondpr September 3, 2023 15:58
@paschalidi paschalidi merged commit 2a8adcd into master Sep 3, 2023
@edmondpr edmondpr deleted the cp/48/returns-the-orgs branch April 28, 2024 15:41
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