mirror of
https://github.com/zadam/trilium.git
synced 2025-01-18 13:11:57 +08:00
fix export in electron (auth problem)
This commit is contained in:
parent
2acff07368
commit
ee0833390a
2 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
|||
"use strict";
|
||||
|
||||
function exportSubTree(noteId) {
|
||||
const url = getHost() + "/api/export/" + noteId;
|
||||
const url = getHost() + "/api/export/" + noteId + "?protectedSessionId="
|
||||
+ encodeURIComponent(protected_session.getProtectedSessionId());
|
||||
|
||||
download(url);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ const wrap = require('express-promise-wrap').wrap;
|
|||
const tar = require('tar-stream');
|
||||
const sanitize = require("sanitize-filename");
|
||||
|
||||
router.get('/:noteId/', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
router.get('/:noteId/', auth.checkApiAuthOrElectron, wrap(async (req, res, next) => {
|
||||
const noteId = req.params.noteId;
|
||||
|
||||
const noteTreeId = await sql.getValue('SELECT noteTreeId FROM note_tree WHERE noteId = ?', [noteId]);
|
||||
|
|
Loading…
Reference in a new issue