Added cloud funciton argument
This commit is contained in:
9
index.js
9
index.js
@@ -51,7 +51,14 @@ function ParseServer(args) {
|
|||||||
}
|
}
|
||||||
if (args.cloud) {
|
if (args.cloud) {
|
||||||
addParseCloud();
|
addParseCloud();
|
||||||
require(args.cloud);
|
if (typeof args.cloud === 'function') {
|
||||||
|
args.cloud(Parse)
|
||||||
|
} else if (typeof args.cloud === 'string') {
|
||||||
|
require(args.cloud);
|
||||||
|
} else {
|
||||||
|
throw "argument 'cloud' must either be a string or a function";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cache.apps[args.appId] = {
|
cache.apps[args.appId] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user