Move api/tiles modules to subfolders

This commit is contained in:
Tom Russell 2019-02-24 12:17:59 +00:00
parent 8214e56022
commit 961441c5c0
6 changed files with 9 additions and 9 deletions

View File

@ -2,7 +2,7 @@
* Building data access * Building data access
* *
*/ */
import db from './db'; import db from '../db';
// data type note: PostgreSQL bigint (64-bit) is handled as string in JavaScript, because of // data type note: PostgreSQL bigint (64-bit) is handled as string in JavaScript, because of
// JavaScript numerics are 64-bit double, giving only partial coverage. // JavaScript numerics are 64-bit double, giving only partial coverage.

View File

@ -6,7 +6,7 @@
* - this DOES expose geometry, another reason to keep this clearly separated from building * - this DOES expose geometry, another reason to keep this clearly separated from building
* data * data
*/ */
import db from './db'; import db from '../db';
function queryLocation(term){ function queryLocation(term){
const max_results = 5; const max_results = 5;

View File

@ -2,7 +2,7 @@
* User data access * User data access
* *
*/ */
import db from './db'; import db from '../db';
function createUser(user) { function createUser(user) {

View File

@ -16,7 +16,7 @@ import pgConnect from 'connect-pg-simple';
import App from './frontend/app'; import App from './frontend/app';
import db from './db'; import db from './db';
import { authUser, createUser, getUserById, authAPIUser, getNewUserAPIKey } from './user'; import { authUser, createUser, getUserById, authAPIUser, getNewUserAPIKey } from './api/user';
import { import {
queryBuildingsAtPoint, queryBuildingsAtPoint,
queryBuildingsByReference, queryBuildingsByReference,
@ -26,9 +26,9 @@ import {
saveBuilding, saveBuilding,
likeBuilding, likeBuilding,
unlikeBuilding unlikeBuilding
} from './building'; } from './api/building';
import { queryLocation } from './search'; import { queryLocation } from './api/search';
import tileserver from './tileserver'; import tileserver from './tiles/tileserver';
import { parseBuildingURL } from './parse'; import { parseBuildingURL } from './parse';
// create server // create server

View File

@ -6,7 +6,7 @@ import path from 'path';
import mapnik from 'mapnik'; import mapnik from 'mapnik';
import SphericalMercator from '@mapbox/sphericalmercator'; import SphericalMercator from '@mapbox/sphericalmercator';
import { strictParseInt } from './parse'; import { strictParseInt } from '../parse';
// connection details from environment variables // connection details from environment variables
const DATASOURCE_CONFIG = { const DATASOURCE_CONFIG = {

View File

@ -5,7 +5,7 @@
import express from 'express'; import express from 'express';
import { render_tile } from './tile'; import { render_tile } from './tile';
import { strictParseInt } from './parse'; import { strictParseInt } from '../parse';
// tiles router // tiles router
const router = express.Router() const router = express.Router()