-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
addParseCloud in ParseServer init function #709
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
Conversation
@shoe116 what version of parse-server are you using? This should be fixed since the Hooks API merge a few days ago. Can you try with your parse-server dependency in package.json set to "parseplatfrom/parse-server#master" ? |
@flovilmart I using master branch's "parse-server" git fetch from this repository yesterday. $git log
commit bd89338b39d384ab795ab39659b705be90ca7d2f
Merge: 97d6e9d 3106508
Author: Drew
Date: Sat Feb 27 12:04:39 2016 -0800
Merge pull request #696 from mcdonamp/gcp-logo
Adding the GCP logo and quickstart |
Alright, do you notice the same behaviour removing the addParseCloud() you added at the bottom? also can you add in
And an according test to make sure no regression occurs in the future? |
@flovilmart I've added a sample function like ParseCloud.define("hello",
function(req, res){res.success("Hello World");}
,function(req){return true}
);
module.exports = ParseCloud; on the end of When I remove the addParseCloud() function at the bottom, call return error {"code":141,"error":"Invalid function."} Please excuse me if I misunderstood. |
Sorry, I don't check |
You should not modify addParseCloud simply adds the ability to define the functions and hooks. No ParseCloud.define should be called here |
@flovilmart OK, I've understood you said "the same behaviour removing the addParseCloud() I add." |
stay tuned I'm adding a unit test to make sure the keys are properly set when calling a Cloud Function |
btw, do you use parse-server as a dependency or directly the repository? |
check #714 |
I'm just an user of parse.com but I liked this product so try to read and write some code for my app's migration on parse.com. |
no problem @shoe116 :) tell me, when you say:
You mean you added your trigger to That is not the expected way to add triggers. You should pass a cloud option to the new ParseServer({}) call see here: https://github.com/parseplatform/parse-server/#basic-options |
@flovilmart yes, I add my sample trigger on So, I have to set cloud param as |
@shoe116 so the sample trigger has nothing to do in
Yes! look at spec/helper.js, you'll see the configuration options pass the |
I try to add my function to triggers by
ParseCloud.define
but failed, becauseParse.applicationId
is null.I think the function
addParseCloud
should be call inParseServer
that is given the appId.