From 4ede03ba76a0ac3a1b76d3825f0eb5a52f27d0e4 Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Wed, 16 Jun 2021 05:10:40 +1000 Subject: [PATCH] Remove cron check --- crabfit-backend/routes/taskCleanup.js | 4 ---- crabfit-backend/routes/taskLegacyCleanup.js | 4 ---- 2 files changed, 8 deletions(-) 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')}`);