From 98c65062e59c722a29360a233a1ec0481291b72d Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Thu, 25 Feb 2016 08:38:00 -0500 Subject: [PATCH] Generates a javascriptKey if not passed for CloudCode --- src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 686e9c6965..a08b43148e 100644 --- a/src/index.js +++ b/src/index.js @@ -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 -}; \ No newline at end of file +};