move hompage redirect to end
This commit is contained in:
parent
4ccefa0252
commit
bfc581cbda
1 changed files with 5 additions and 5 deletions
|
@ -19,11 +19,6 @@ async function redirectMiddleware(ctx, next) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path === '/') {
|
|
||||||
ctx.redirect(`/$/${PAGES.CHANNELS_FOLLOWING}`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!path.startsWith('/$/') && path.match(/^([^@/:]+)\/([^:/]+)$/)) {
|
if (!path.startsWith('/$/') && path.match(/^([^@/:]+)\/([^:/]+)$/)) {
|
||||||
ctx.redirect(url.replace(/^([^@/:]+)\/([^:/]+)(:(\/.*))/, '$1:$2')); // test against path, but use ctx.url to retain parameters
|
ctx.redirect(url.replace(/^([^@/:]+)\/([^:/]+)(:(\/.*))/, '$1:$2')); // test against path, but use ctx.url to retain parameters
|
||||||
return;
|
return;
|
||||||
|
@ -43,6 +38,11 @@ async function redirectMiddleware(ctx, next) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (path === '/') {
|
||||||
|
ctx.redirect(`/$/${PAGES.CHANNELS_FOLLOWING}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// No redirects needed
|
// No redirects needed
|
||||||
await next();
|
await next();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue