Fixing issue with router expecting a trailing slash for GET /cron
This commit is contained in:
parent
4e23288cbd
commit
69f7f50f5f
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ export class CronRouter extends Router {
|
||||||
const { url = '', method } = req
|
const { url = '', method } = req
|
||||||
const [route] = url.split('?')
|
const [route] = url.split('?')
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case /^\/cron\/$/.test(route) && method === 'GET': {
|
case /^\/cron\/?$/.test(route) && method === 'GET': {
|
||||||
await this.GET_cron(req, res)
|
await this.GET_cron(req, res)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue