Added cron route

This commit is contained in:
Keith Holliday
2017-06-08 14:07:33 -07:00
parent 137636cb40
commit 60de7c8f21
2 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
import { authWithHeaders } from '../../middlewares/auth';
import cron from '../middlewares/cron';
let api = {};
/**
* @api {post} /api/v3/cron Runs cron
* @apiName Cron
* @apiGroup Cron
*
* @apiSuccess {Object} data An empty Object
*/
api.cron = {
method: 'POST',
url: '/debug/cron',
middlewares: [authWithHeaders(), cron],
async handler (req, res) {
res.respond(200, {});
},
};