* Adding a test demonstrating issue #1840. * Fixes #1840 * Adds failing test with other use case - That test fails on parse.com as well * Bumps parse to 1.9.0 * exclude pg db * Exclude pg on other test * Adds clientSDK compatibility check for forward deletion - Mark js1.9.0 as compatible * Strips all operations from result - fix for #1606
This commit is contained in:
@@ -5,17 +5,7 @@ var Parse = require('parse/node').Parse;
|
||||
|
||||
var auth = require('./Auth');
|
||||
var Config = require('./Config');
|
||||
|
||||
function clientSDKFromVersion(version) {
|
||||
let versionRE = /([-a-zA-Z]+)([0-9\.]+)/;
|
||||
let match = version.toLowerCase().match(versionRE);
|
||||
if (match && match.length === 3) {
|
||||
return {
|
||||
sdk: match[1],
|
||||
version: match[2]
|
||||
}
|
||||
}
|
||||
}
|
||||
var ClientSDK = require('./ClientSDK');
|
||||
|
||||
// Checks that the request is authorized for this app and checks user
|
||||
// auth too.
|
||||
@@ -106,7 +96,7 @@ function handleParseHeaders(req, res, next) {
|
||||
}
|
||||
|
||||
if (info.clientVersion) {
|
||||
info.clientSDK = clientSDKFromVersion(info.clientVersion);
|
||||
info.clientSDK = ClientSDK.fromString(info.clientVersion);
|
||||
}
|
||||
|
||||
if (fileViaJSON) {
|
||||
@@ -300,5 +290,4 @@ module.exports = {
|
||||
handleParseHeaders: handleParseHeaders,
|
||||
enforceMasterKeyAccess: enforceMasterKeyAccess,
|
||||
promiseEnforceMasterKeyAccess,
|
||||
clientSDKFromVersion
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user