mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-30 19:27:48 +08:00
17 lines
384 B
TypeScript
17 lines
384 B
TypeScript
import type { Router } from "express";
|
|
|
|
import eu from "./etapi_utils.js";
|
|
import backupService from "../services/backup.js";
|
|
|
|
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 default {
|
|
register
|
|
};
|