Fix minor comment typo (#4110)
* Fix minor comment typo * get the rest of the typos. use US spelling for behavior.
This commit is contained in:
@@ -259,7 +259,7 @@ DatabaseController.prototype.update = function(className, query, update, {
|
|||||||
validateQuery(query);
|
validateQuery(query);
|
||||||
return schemaController.getOneSchema(className, true)
|
return schemaController.getOneSchema(className, true)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
// If the schema doesn't exist, pretend it exists with no fields. This behaviour
|
// If the schema doesn't exist, pretend it exists with no fields. This behavior
|
||||||
// will likely need revisiting.
|
// will likely need revisiting.
|
||||||
if (error === undefined) {
|
if (error === undefined) {
|
||||||
return { fields: {} };
|
return { fields: {} };
|
||||||
@@ -449,7 +449,7 @@ DatabaseController.prototype.destroy = function(className, query, { acl } = {})
|
|||||||
validateQuery(query);
|
validateQuery(query);
|
||||||
return schemaController.getOneSchema(className)
|
return schemaController.getOneSchema(className)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
// If the schema doesn't exist, pretend it exists with no fields. This behaviour
|
// If the schema doesn't exist, pretend it exists with no fields. This behavior
|
||||||
// will likely need revisiting.
|
// will likely need revisiting.
|
||||||
if (error === undefined) {
|
if (error === undefined) {
|
||||||
return { fields: {} };
|
return { fields: {} };
|
||||||
@@ -650,7 +650,7 @@ DatabaseController.prototype.reduceInRelation = function(className, query, schem
|
|||||||
|
|
||||||
// remove the current queryKey as we don,t need it anymore
|
// remove the current queryKey as we don,t need it anymore
|
||||||
delete query[key];
|
delete query[key];
|
||||||
// execute each query independnently to build the list of
|
// execute each query independently to build the list of
|
||||||
// $in / $nin
|
// $in / $nin
|
||||||
const promises = queries.map((q) => {
|
const promises = queries.map((q) => {
|
||||||
if (!q) {
|
if (!q) {
|
||||||
@@ -783,11 +783,11 @@ DatabaseController.prototype.find = function(className, query, {
|
|||||||
return this.loadSchema()
|
return this.loadSchema()
|
||||||
.then(schemaController => {
|
.then(schemaController => {
|
||||||
//Allow volatile classes if querying with Master (for _PushStatus)
|
//Allow volatile classes if querying with Master (for _PushStatus)
|
||||||
//TODO: Move volatile classes concept into mongo adatper, postgres adapter shouldn't care
|
//TODO: Move volatile classes concept into mongo adapter, postgres adapter shouldn't care
|
||||||
//that api.parse.com breaks when _PushStatus exists in mongo.
|
//that api.parse.com breaks when _PushStatus exists in mongo.
|
||||||
return schemaController.getOneSchema(className, isMaster)
|
return schemaController.getOneSchema(className, isMaster)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
// Behaviour for non-existent classes is kinda weird on Parse.com. Probably doesn't matter too much.
|
// Behavior for non-existent classes is kinda weird on Parse.com. Probably doesn't matter too much.
|
||||||
// For now, pretend the class exists but has no objects,
|
// For now, pretend the class exists but has no objects,
|
||||||
if (error === undefined) {
|
if (error === undefined) {
|
||||||
classExists = false;
|
classExists = false;
|
||||||
@@ -797,7 +797,7 @@ DatabaseController.prototype.find = function(className, query, {
|
|||||||
})
|
})
|
||||||
.then(schema => {
|
.then(schema => {
|
||||||
// Parse.com treats queries on _created_at and _updated_at as if they were queries on createdAt and updatedAt,
|
// Parse.com treats queries on _created_at and _updated_at as if they were queries on createdAt and updatedAt,
|
||||||
// so duplicate that behaviour here. If both are specified, the corrent behaviour to match Parse.com is to
|
// so duplicate that behavior here. If both are specified, the correct behavior to match Parse.com is to
|
||||||
// use the one that appears first in the sort list.
|
// use the one that appears first in the sort list.
|
||||||
if (sort._created_at) {
|
if (sort._created_at) {
|
||||||
sort.createdAt = sort._created_at;
|
sort.createdAt = sort._created_at;
|
||||||
@@ -925,7 +925,7 @@ DatabaseController.prototype.addPointerPermissions = function(schema, className,
|
|||||||
// the ACL should have exactly 1 user
|
// the ACL should have exactly 1 user
|
||||||
if (perms && perms[field] && perms[field].length > 0) {
|
if (perms && perms[field] && perms[field].length > 0) {
|
||||||
// No user set return undefined
|
// No user set return undefined
|
||||||
// If the length is > 1, that means we didn't dedup users correctly
|
// If the length is > 1, that means we didn't de-dupe users correctly
|
||||||
if (userACL.length != 1) {
|
if (userACL.length != 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user