trilium/node/routes/api/password.js

13 lines
431 B
JavaScript
Raw Normal View History

const express = require('express');
const router = express.Router();
2017-10-16 05:09:41 +08:00
const sql = require('../../sql');
const changePassword = require('../../change_password');
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;