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:
parent
b22050c037
commit
3965e8051b
1 changed files with 8 additions and 0 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue