Always send JSON responses
This commit is contained in:
parent
7d0f3898de
commit
4ab944b13c
9 changed files with 20 additions and 19 deletions
|
|
@ -2,7 +2,7 @@ import dayjs from 'dayjs'
|
|||
|
||||
const taskRemoveOrphans = 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')
|
||||
return res.status(400).send({ error: 'This task can only be run from a cron job' })
|
||||
}
|
||||
|
||||
const threeMonthsAgo = dayjs().subtract(3, 'month').unix()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue