Fixing issue with router expecting a trailing slash for GET /cron

This commit is contained in:
Collin Duncan 2023-02-08 13:50:12 +01:00
parent 4e23288cbd
commit 69f7f50f5f
No known key found for this signature in database

View file

@ -11,7 +11,7 @@ export class CronRouter extends Router {
const { url = '', method } = req
const [route] = url.split('?')
switch (true) {
case /^\/cron\/$/.test(route) && method === 'GET': {
case /^\/cron\/?$/.test(route) && method === 'GET': {
await this.GET_cron(req, res)
break
}