Files
habitica/website/server/controllers/api-v3/cron.js
Keith Holliday 60de7c8f21 Added cron route
2017-06-08 14:07:33 -07:00

21 lines
401 B
JavaScript

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, {});
},
};