mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 02:52:27 +08:00
20 lines
450 B
JavaScript
20 lines
450 B
JavaScript
"use strict";
|
|
|
|
const optionService = require('../../services/options');
|
|
const RecentNote = require('../../entities/recent_note');
|
|
|
|
async function addRecentNote(req) {
|
|
const branchId = req.body.branchId;
|
|
const notePath = req.body.notePath;
|
|
|
|
await new RecentNote({
|
|
branchId: branchId,
|
|
notePath: notePath
|
|
}).save();
|
|
|
|
await optionService.setOption('startNotePath', notePath);
|
|
}
|
|
|
|
module.exports = {
|
|
addRecentNote
|
|
}; |