habitica-self-host/website/server/controllers/api-v3/cron.js

23 lines
421 B
JavaScript
Raw Normal View History

2017-06-08 21:07:33 +00:00
import { authWithHeaders } from '../../middlewares/auth';
2017-06-08 22:37:36 +00:00
import cron from '../../middlewares/cron';
2017-06-08 21:07:33 +00:00
let api = {};
/**
* @api {post} /api/v3/cron Runs cron
* @apiName Cron
* @apiGroup Cron
*
* @apiSuccess {Object} data An empty Object
*/
api.cron = {
method: 'POST',
2017-06-09 00:10:05 +00:00
url: '/cron',
2017-06-08 21:07:33 +00:00
middlewares: [authWithHeaders(), cron],
async handler (req, res) {
res.respond(200, {});
},
};
2017-06-09 00:10:05 +00:00
module.exports = api;