"sync now" button

This commit is contained in:
azivner
2017-10-29 11:22:41 -04:00
parent c28b7775a5
commit d613200925
5 changed files with 79 additions and 25 deletions

View File

@@ -5,6 +5,15 @@ const router = express.Router();
const auth = require('../../services/auth');
const sync = require('../../services/sync');
router.post('/now', auth.checkApiAuth, async (req, res, next) => {
const log = await sync.sync();
res.send({
success: true,
log: log
});
});
router.get('/changed/:since', auth.checkApiAuth, async (req, res, next) => {
const since = parseInt(req.params.since);