trilium/node/routes/password.js

13 lines
422 B
JavaScript
Raw Normal View History

const express = require('express');
const router = express.Router();
const sql = require('../sql');
const changePassword = require('../change_password');
2017-10-16 04:32:49 +08:00
const auth = require('../auth');
2017-10-16 04:32:49 +08:00
router.post('/change', auth.checkApiAuth, async (req, res, next) => {
const result = await changePassword.changePassword(req.body['current_password'], req.body['new_password']);
res.send(result);
});
module.exports = router;