Generates a javascriptKey if not passed for CloudCode

This commit is contained in:
Florent Vilmart
2016-02-25 08:38:00 -05:00
parent e5b1d50343
commit 98c65062e5

View File

@@ -39,6 +39,7 @@ import { LoggerController } from './Controllers/LoggerController';
import { HooksController } from './Controllers/HooksController';
import requiredParameter from './requiredParameter';
import { randomString } from './cryptoUtils';
// Mutate the Parse object to add the Cloud Code handlers
addParseCloud();
@@ -79,7 +80,7 @@ function ParseServer({
cloud,
collectionPrefix = '',
clientKey = '',
javascriptKey = '',
javascriptKey = randomString(20),
dotNetKey = '',
restAPIKey = '',
fileKey = 'invalid-file-key',
@@ -227,4 +228,4 @@ function getClassName(parseClass) {
module.exports = {
ParseServer: ParseServer,
S3Adapter: S3Adapter
};
};