diff --git a/crabfit-backend/routes/taskCleanup.js b/crabfit-backend/routes/taskCleanup.js index 2feb364..28182e5 100644 --- a/crabfit-backend/routes/taskCleanup.js +++ b/crabfit-backend/routes/taskCleanup.js @@ -1,10 +1,6 @@ const dayjs = require('dayjs'); module.exports = async (req, res) => { - if (req.header('X-Appengine-Cron') === undefined) { - return res.status(400).send('This task can only be run from a cron job'); - } - const threeMonthsAgo = dayjs().subtract(3, 'month').unix(); console.log(`Running cleanup task at ${dayjs().format('h:mma D MMM YYYY')}`); diff --git a/crabfit-backend/routes/taskLegacyCleanup.js b/crabfit-backend/routes/taskLegacyCleanup.js index 5253413..cbb3e6e 100644 --- a/crabfit-backend/routes/taskLegacyCleanup.js +++ b/crabfit-backend/routes/taskLegacyCleanup.js @@ -1,10 +1,6 @@ const dayjs = require('dayjs'); module.exports = async (req, res) => { - if (req.header('X-Appengine-Cron') === undefined) { - return res.status(400).send('This task can only be run from a cron job'); - } - const threeMonthsAgo = dayjs().subtract(3, 'month').unix(); console.log(`Running LEGACY cleanup task at ${dayjs().format('h:mma D MMM YYYY')}`);