trilium/routes/api/anonymization.js

15 lines
408 B
JavaScript
Raw Normal View History

2017-12-16 13:05:37 +08:00
"use strict";
const express = require('express');
const router = express.Router();
const anonymization = require('../../services/anonymization');
2017-12-23 22:57:20 +08:00
const auth = require('../../services/auth');
const wrap = require('express-promise-wrap').wrap;
2017-12-16 13:05:37 +08:00
router.post('/anonymize', auth.checkApiAuth, wrap(async (req, res, next) => {
2017-12-16 13:05:37 +08:00
await anonymization.anonymize();
res.send({});
}));
2017-12-16 13:05:37 +08:00
module.exports = router;