-
Notifications
You must be signed in to change notification settings - Fork 50
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
CloudCode Functions? #65
Comments
I accomplished this by editing the pathForType function in addon/adapters/application.js. Add a case for "functions". Then I use this code to make a function call: Adapter.ajax(Adapter.buildURL("function", "someCloudFunction"), "POST", {
data: {
foo: bar
}
}); |
@joshfester nice one! |
@JoshFoster, would you have to use a model of type |
In my app it ended up being easiest to just put the functions on the application route since I only use a handful of cloud functions. To me it would make the most sense if every model could have "functions" the same way that controllers have "actions". Then you could call someModel.cloudFunction(data) |
@joshfester, can you provide an example? In my case, I'm simply looking to query a set of data based on the user's current location, so I don't quite follow how I would set a route's model to the result. Perhaps you could add an example to the dummy app? |
@srsgores sorry I should have clarified. My suggestion was a feature request to solve this issue via the adapter. In your case I'd suggest using my quick fix until support gets added to the adapter. |
Is there a way to get cloudcode functions working? I want to be able to query a certain model with a
POST
request, passing in geolocation data.POST http://api.parse.com/1/functions/proximity
with
Is this possible yet? If not, how can it be implemented?
The text was updated successfully, but these errors were encountered: