mirror of
https://github.com/zadam/trilium.git
synced 2024-11-16 04:35:40 +08:00
14 lines
351 B
JavaScript
14 lines
351 B
JavaScript
|
"use strict";
|
||
|
|
||
|
const express = require('express');
|
||
|
const router = express.Router();
|
||
|
const auth = require('../../services/auth');
|
||
|
const sql = require('../../services/sql');
|
||
|
|
||
|
router.post('/execute', auth.checkApiAuth, async (req, res, next) => {
|
||
|
const query = req.body.query;
|
||
|
|
||
|
res.send(await sql.getResults(query));
|
||
|
});
|
||
|
|
||
|
module.exports = router;
|