mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
sharing WIP
This commit is contained in:
21
src/share/routes.js
Normal file
21
src/share/routes.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const shaca = require("./shaca/shaca");
|
||||
const shacaLoader = require("./shaca/shaca_loader");
|
||||
|
||||
function register(router) {
|
||||
router.get('/share/:noteId', (req, res, next) => {
|
||||
const {noteId} = req.params;
|
||||
|
||||
shacaLoader.ensureLoad();
|
||||
|
||||
if (noteId in shaca.notes) {
|
||||
res.send(shaca.notes[noteId].title);
|
||||
}
|
||||
else {
|
||||
res.send("FFF");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
register
|
||||
}
|
||||
Reference in New Issue
Block a user