-
Notifications
You must be signed in to change notification settings - Fork 117
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
Always return data #45
Comments
Unfortunately, the only way to alter the response in the collection routes at the moment is to override the individual collection endpoints, which is a terrible solution. The good news is that this is very high on my priority list, and will be resolved in the first update after the Iron Router dependency is removed. What you need is a hook that runs immediately before the response is returned in collection endpoints, allowing you to modify the default response. I'll also allow the default endpoints to be completely overridden, in case you want to do something completely different but want to keep things DRY. This is related to #42, #12 , and #18. I'll keep you posted on any progress. |
Thanks for the quick response |
Hi @kahmali, @wbashir {
"_id": "QjCjP2DwqHqZJq54f"
"name": "item name",
"createdBy": "BeNTtaupkj5JfpJcH",
"createdAt": "2016-06-18T10:00:04.113Z",
"isPrivate": false,
"isDeleted": false
} instead of {
"status": "success",
"data": [
{
"_id": "QjCjP2DwqHqZJq54f"
"name": "item name",
"createdBy": "BeNTtaupkj5JfpJcH",
"createdAt": "2016-06-18T10:00:04.113Z",
"isPrivate": false,
"isDeleted": false
}
]
} Maybe somebody have solution? |
Is there a way to always return the data array instead of the traditional formatted
status
anddata
request like so:The text was updated successfully, but these errors were encountered: