-
Notifications
You must be signed in to change notification settings - Fork 100
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
Update request for project related resources; Cleanup to match back-end #408
Conversation
jeffdaley
commented
Nov 7, 2023
•
edited
Loading
edited
- Updates the Project requests to grab the related resources separately.
- Renames stuff to align with the back end
- Cleanup and note-to-self
/** | ||
* Used by the /projects route to fetch a list of projects. | ||
*/ | ||
this.get("/projects", () => { | ||
const projects = this.schema.projects.all().models; | ||
return new Response(200, {}, projects); | ||
}); | ||
|
||
/** | ||
* Used by the /projects/:project_id route to fetch a single project. | ||
*/ | ||
this.get("/projects/:project_id", (schema, request) => { | ||
const project = schema.projects.findBy({ | ||
id: request.params.project_id, | ||
}); | ||
return new Response(200, {}, project.attrs); | ||
}); | ||
|
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.
These were duplicates. Probably a merge error.
jiraIssueID?: string; | ||
jiraIssue?: JiraIssue; |
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.
Is jiraIssueID
supposed to represent the internal Jira ID (if so, curious how we use that)? Can we put that as part of a JiraIssue
? Note/caveat: I haven't dove into the Jira part of the backend work yet so I'm cool with this changing as we start to incorporate that.
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 interpreted JiraIssueID to be an external reference, like "LABS-123" (as in test-org.atlassian.com/issues/LABS-123
that would be used to query the Jira API for the full JiraIssue
object.