-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix comment endpoints to match ember #372
Conversation
272f430
to
a08f5b5
Compare
@joshsmith Could use a look here. Not sure if we should merge as is, or switch to what I described. |
@begedin I think we should switch to what you described. Is that your recommendation? |
@joshsmith I would say it is, yes. It's more in line with the rest of the app and simplifies things to a good degree. |
Okay do you want to update labels then and create an issue in Ember? |
Created ember issue code-corps/code-corps-ember#644 |
a08f5b5
to
4f2f997
Compare
Made the modifications here and opened a PR for the ember side of the issue - code-corps/code-corps-ember#647. Both are ready for review. |
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 don't think this includes changes to the API Blueprint documentation.
Simplify comments endpoint Add API Blueprint documentation
b7b0ef7
to
5f0682a
Compare
This should resolve #340
This one eliminates the
tasks/:task_id/comments/:comment_id
endpoint, since we don't really need it.It also fixes the
tasks/:task_id/comments
endpoint to return all comments for the specified task. Additionally, this change eliminates thecomments
endpoint (the one that returns all comments for all tasks) by not defining a catch allhandle_index
function for it. We should not be needing that one..However, I'm not sure we should merge this. This is what our model hook looks like on the task route in ember:
So, there are two steps here
Step 1:
projectId
andnumber
null
otherwiseStep 2
This is atypical behaviour we have here. A simpler approach would be to
projectId
andnumber
task.comments
relationship, same as any other place we do it in.Due to all this, I propose that we
@joshsmith Let me know what you think about it. If you don't think such a simplification is needed, then this PR is mergeable.