mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Added cron route
This commit is contained in:
20
website/server/controllers/api-v3/cron.js
Normal file
20
website/server/controllers/api-v3/cron.js
Normal 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, {});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user