Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237)

This commit is contained in:
Quincy Morgan
2019-04-24 13:45:59 -07:00
parent 862eca9ddd
commit d01bb78707
158 changed files with 503 additions and 472 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import { request as d3_request } from 'd3-request';
import { geoExtent, geoVecAdd, geoVecScale } from '../geo';
import { qaError } from '../osm';
import { services } from './index';
import { serviceOsm } from './index';
import { t } from '../util/locale';
import { utilRebind, utilTiler, utilQsString } from '../util';
@@ -359,7 +359,7 @@ export default {
},
postUpdate: function(d, callback) {
if (!services.osm.authenticated()) { // Username required in payload
if (!serviceOsm.authenticated()) { // Username required in payload
return callback({ message: 'Not Authenticated', status: -3}, d);
}
if (_erCache.inflightPost[d.id]) {
@@ -369,7 +369,7 @@ export default {
var that = this;
// Payload can only be sent once username is established
services.osm.userDetails(sendPayload);
serviceOsm.userDetails(sendPayload);
function sendPayload(err, user) {
if (err) { return callback(err, d); }
+1 -1
View File
@@ -9,7 +9,7 @@ import {
import rbush from 'rbush';
import { geoExtent, geoScaleToZoom } from '../geo';
import { svgDefs } from '../svg';
import { svgDefs } from '../svg/defs';
import { utilArrayUnion, utilQsString, utilRebind, utilTiler } from '../util';
+2 -2
View File
@@ -1,6 +1,6 @@
import { areaKeys } from '../core/context';
import { areaKeys } from '../core/area_keys';
import { utilArrayIntersection } from '../util';
import { validationIssue } from '../core/validator';
import { validationIssue } from '../core/validation';
var buildRuleChecks = function() {