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');
|
2018-01-07 22:35:44 +08:00
|
|
|
const wrap = require('express-promise-wrap').wrap;
|
2017-12-16 13:05:37 +08:00
|
|
|
|
2018-01-07 22:35:44 +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({});
|
2018-01-07 22:35:44 +08:00
|
|
|
}));
|
2017-12-16 13:05:37 +08:00
|
|
|
|
|
|
|
module.exports = router;
|