trilium/routes/api/anonymization.js

14 lines
351 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');
2017-12-16 13:05:37 +08:00
2017-12-23 22:57:20 +08:00
router.post('/anonymize', auth.checkApiAuth, async (req, res, next) => {
2017-12-16 13:05:37 +08:00
await anonymization.anonymize();
res.send({});
});
module.exports = router;