Lets stick to base-path for API.

Removed /api/lighthouse from path, updated API doc.
This commit is contained in:
Fillerino 2017-09-26 18:40:33 +02:00
parent fd7f751523
commit c026893c32
2 changed files with 2 additions and 7 deletions

View file

@ -3,8 +3,8 @@
"version": "0.0.1",
"description": "Lighthouse - Next-gen search api for LBRY",
"title": "Lighthouse API DOCS",
"url" : "http://localhost/api/lighthouse",
"sampleUrl": "http://localhost/api/lighthouse",
"url" : "http://localhost",
"sampleUrl": "http://localhost",
"json_body": true,
"template": {
"withCompare": true,

View file

@ -1,16 +1,11 @@
import 'babel-polyfill';
import Router from 'koa-router';
import { baseApi } from '../config';
import LighthouseControllers from '../controllers/lighthouse';
LighthouseControllers.startSync();
const api = 'lighthouse';
const router = new Router();
router.prefix(`/${baseApi}/${api}`);
// GET /api/lighthouse
router.get('/', LighthouseControllers.info);