0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Added hacked redirect for Offers

refs https://github.com/TryGhost/Team/issues/1091

This is a hack version of adding a redirect for the one-day version of
Offers.
This commit is contained in:
Fabien O'Carroll 2021-09-28 14:45:08 +02:00
parent b22050c037
commit 3965e8051b

View file

@ -8,6 +8,7 @@ const errors = require('@tryghost/errors');
const i18n = require('../../../../shared/i18n');
const logging = require('@tryghost/logging');
const redirectsService = require('../../../services/redirects');
const labsService = require('../../../../shared/labs');
const _private = {};
@ -21,6 +22,13 @@ _private.registerRoutes = () => {
try {
const redirects = redirectsService.loadRedirectsFile();
if (labsService.isSet('offers')) {
redirects.unshift({
from: '/zimo50',
to: '/#/portal/offers/abcdefuckoff'
});
}
redirectsService.validate(redirects);
redirects.forEach((redirect) => {