mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
17 lines
379 B
TypeScript
17 lines
379 B
TypeScript
import { Router } from "express";
|
|
|
|
import eu = require('./etapi_utils');
|
|
import backupService = require('../services/backup');
|
|
|
|
function register(router: Router) {
|
|
eu.route(router, 'put', '/etapi/backup/:backupName', async (req, res, next) => {
|
|
await backupService.backupNow(req.params.backupName);
|
|
|
|
res.sendStatus(204);
|
|
});
|
|
}
|
|
|
|
export = {
|
|
register
|
|
};
|