Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit 4c70244

Browse files
author
tkostuch
committed
clean folder structure
1 parent acd3d93 commit 4c70244

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/api/url/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Router } from 'express';
2+
import createMapRoute from './map';
3+
4+
module.exports = ({ config }) => {
5+
const router = Router()
6+
7+
router.use('/map', createMapRoute({ config }))
8+
9+
return router
10+
}

src/api/url.js renamed to src/api/url/map.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Router } from 'express';
2-
import { apiStatus } from '../lib/util';
3-
import { buildMultiEntityUrl } from '../lib/elastic';
2+
import { apiStatus } from '../../lib/util';
3+
import { buildMultiEntityUrl } from '../../lib/elastic';
44
import request from 'request';
55
import get from 'lodash/get';
66

@@ -44,7 +44,7 @@ const checkFieldValueEquality = ({ config, response, value }) => {
4444

4545
module.exports = ({ config }) => {
4646
const router = Router()
47-
router.post('/map/:index', (req, res) => {
47+
router.post('/:index', (req, res) => {
4848
const { url, excludeFields, includeFields } = req.body
4949
if (!url) {
5050
return apiStatus(res, 'Missing url', 500);

0 commit comments

Comments
 (0)