Lets stick to base-path for API.
Removed /api/lighthouse from path, updated API doc.
This commit is contained in:
parent
fd7f751523
commit
c026893c32
2 changed files with 2 additions and 7 deletions
|
@ -3,8 +3,8 @@
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "Lighthouse - Next-gen search api for LBRY",
|
"description": "Lighthouse - Next-gen search api for LBRY",
|
||||||
"title": "Lighthouse API DOCS",
|
"title": "Lighthouse API DOCS",
|
||||||
"url" : "http://localhost/api/lighthouse",
|
"url" : "http://localhost",
|
||||||
"sampleUrl": "http://localhost/api/lighthouse",
|
"sampleUrl": "http://localhost",
|
||||||
"json_body": true,
|
"json_body": true,
|
||||||
"template": {
|
"template": {
|
||||||
"withCompare": true,
|
"withCompare": true,
|
||||||
|
|
|
@ -1,16 +1,11 @@
|
||||||
import 'babel-polyfill';
|
import 'babel-polyfill';
|
||||||
import Router from 'koa-router';
|
import Router from 'koa-router';
|
||||||
import { baseApi } from '../config';
|
|
||||||
import LighthouseControllers from '../controllers/lighthouse';
|
import LighthouseControllers from '../controllers/lighthouse';
|
||||||
|
|
||||||
LighthouseControllers.startSync();
|
LighthouseControllers.startSync();
|
||||||
|
|
||||||
const api = 'lighthouse';
|
|
||||||
|
|
||||||
const router = new Router();
|
const router = new Router();
|
||||||
|
|
||||||
router.prefix(`/${baseApi}/${api}`);
|
|
||||||
|
|
||||||
// GET /api/lighthouse
|
// GET /api/lighthouse
|
||||||
router.get('/', LighthouseControllers.info);
|
router.get('/', LighthouseControllers.info);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue