Skip to content

Commit 98c6506

Browse files
committed
Generates a javascriptKey if not passed for CloudCode
1 parent e5b1d50 commit 98c6506

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { LoggerController } from './Controllers/LoggerController';
3939
import { HooksController } from './Controllers/HooksController';
4040

4141
import requiredParameter from './requiredParameter';
42+
import { randomString } from './cryptoUtils';
4243
// Mutate the Parse object to add the Cloud Code handlers
4344
addParseCloud();
4445

@@ -79,7 +80,7 @@ function ParseServer({
7980
cloud,
8081
collectionPrefix = '',
8182
clientKey = '',
82-
javascriptKey = '',
83+
javascriptKey = randomString(20),
8384
dotNetKey = '',
8485
restAPIKey = '',
8586
fileKey = 'invalid-file-key',
@@ -227,4 +228,4 @@ function getClassName(parseClass) {
227228
module.exports = {
228229
ParseServer: ParseServer,
229230
S3Adapter: S3Adapter
230-
};
231+
};

0 commit comments

Comments
 (0)