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 cohorts/:cohortId/projects?type=remote | Route #17

Closed
3 tasks
MohammedAlghazali opened this issue Mar 26, 2020 · 0 comments
Closed
3 tasks

GET cohorts/:cohortId/projects?type=remote | Route #17

MohammedAlghazali opened this issue Mar 26, 2020 · 0 comments
Labels

Comments

@MohammedAlghazali
Copy link
Member

relates #5

Route: GET api/v1/cohorts/:cohortId/projects?type=remote

Acceptance Criteria
  • DB query
  • Response
  • Testing

Request body

 The request hasn't body

DB query

SELECT * FROM project WHERE projectType = 'remote' and cohortId = cohortId;

Response

  • Success
{ statusCode:200 ,
data:[{
id,
name,
description,
imgUrl,
githubLink,
websiteLink,
projectType,
cohortId,
}] }
  • Failed
{statusCode:400, message:"cohortId or project Type incorrect"}

Testing

to be a successful test

  • status === 200
  • typeof(data) === "array"
  • data.length !== 0
@MohammedAlghazali MohammedAlghazali changed the title cohorts/:cohortId/projects?type=remote | Route GET cohorts/:cohortId/projects?type=remote | Route Mar 26, 2020
@Mu7ammadAbed Mu7ammadAbed mentioned this issue Mar 26, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants