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

Get organization by ID endpoint #8

Open
8ivek opened this issue Feb 16, 2020 · 0 comments
Open

Get organization by ID endpoint #8

8ivek opened this issue Feb 16, 2020 · 0 comments
Assignees
Labels
story A new feature that has been prioritized

Comments

@8ivek
Copy link
Member

8ivek commented Feb 16, 2020

User Story
We need an endpoint v1/organizations/:id that will return an organization array in JSON format.
We already have organizations array in server.js file

const organizations = []

note: this endpoint will return only one organization with id defined by ":id" in url.

If you have any questions about this issue please slack in (#proj-unitednepali) or comment here.
https://nepalcodes.slack.com/archives/CT5S2H74G

endpoint:
v1/organizations/:id
example: v1/organizations/1
method: GET
response format:

{
	"success": 1,
	"timestamp": "2020-02-16T14:02-0400",
	"results": [
		"organization": [
			{
				....
			}
		]
	]
}

Acceptance Criteria
When querying from rest client (or browser) it should return the organization with the id as an array in JSON format.

Test
Create a test (inside the cypress folder) and make sure the endpoint returns the expected response as above.

@8ivek 8ivek added the story A new feature that has been prioritized label Feb 16, 2020
@8ivek 8ivek changed the title [STORY] Get organization by ID endpoint Feb 16, 2020
@christikaes christikaes added this to the API runs locally milestone Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
story A new feature that has been prioritized
Projects
None yet
Development

No branches or pull requests

3 participants