mirror of
https://github.com/zadam/trilium.git
synced 2024-12-27 01:34:05 +08:00
14 lines
No EOL
351 B
JavaScript
14 lines
No EOL
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; |