Postgres: $all, $and CLP and more (#2551)
* Adds passing tests * Better containsAll implementation * Full Geopoint support, fix inverted lat/lng * Adds support for $and operator / PointerPermissions specs * Fix issue updating CLPs on schema * Extends query support * Adds RestCreate to the specs * Adds User specs * Adds error handlers for failing tests * nits * Proper JSON update of AuthData * fix for #1259 with PG * Fix for Installations _PushStatus test * Adds support for GlobalConfig * Enables relations tests * Exclude spec as legacy * Makes corner case for 1 in GlobalConfig
This commit is contained in:
@@ -5,7 +5,7 @@ import * as middleware from "../middlewares";
|
||||
|
||||
export class GlobalConfigRouter extends PromiseRouter {
|
||||
getGlobalConfig(req) {
|
||||
return req.config.database.find('_GlobalConfig', { objectId: 1 }, { limit: 1 }).then((results) => {
|
||||
return req.config.database.find('_GlobalConfig', { objectId: "1" }, { limit: 1 }).then((results) => {
|
||||
if (results.length != 1) {
|
||||
// If there is no config in the database - return empty config.
|
||||
return { response: { params: {} } };
|
||||
@@ -22,7 +22,7 @@ export class GlobalConfigRouter extends PromiseRouter {
|
||||
acc[`params.${key}`] = params[key];
|
||||
return acc;
|
||||
}, {});
|
||||
return req.config.database.update('_GlobalConfig', {objectId: 1}, update, {upsert: true}).then(() => ({ response: { result: true } }));
|
||||
return req.config.database.update('_GlobalConfig', {objectId: "1"}, update, {upsert: true}).then(() => ({ response: { result: true } }));
|
||||
}
|
||||
|
||||
mountRoutes() {
|
||||
|
||||
Reference in New Issue
Block a user