mirror of
https://github.com/zadam/trilium.git
synced 2024-11-11 18:08:13 +08:00
ETAPI WIP
This commit is contained in:
parent
c33bc7e12c
commit
c448d34a38
3 changed files with 2 additions and 6 deletions
|
@ -333,8 +333,6 @@ components:
|
|||
type: string
|
||||
content:
|
||||
type: string
|
||||
|
||||
|
||||
Note:
|
||||
type: object
|
||||
properties:
|
|
@ -18,8 +18,6 @@ function register(router) {
|
|||
|
||||
const foundNotes = searchService.searchNotes(search, searchParams);
|
||||
|
||||
console.log(foundNotes.map(note => mappers.mapNoteToPojo(note)));
|
||||
|
||||
res.json(foundNotes.map(note => mappers.mapNoteToPojo(note)));
|
||||
});
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const specPath = path.join(__dirname, 'spec.openapi.yaml');
|
||||
const specPath = path.join(__dirname, 'etapi.openapi.yaml');
|
||||
let spec = null;
|
||||
|
||||
function register(router) {
|
||||
router.get('/etapi/spec.openapi.yaml', (req, res, next) => {
|
||||
router.get('/etapi/etapi.openapi.yaml', (req, res, next) => {
|
||||
if (!spec) {
|
||||
spec = fs.readFileSync(specPath, 'utf8');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue