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;
|
||||
}
|
||||
|
||||
if (path === '/') {
|
||||
ctx.redirect(`/$/${PAGES.CHANNELS_FOLLOWING}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!path.startsWith('/$/') && path.match(/^([^@/:]+)\/([^:/]+)$/)) {
|
||||
ctx.redirect(url.replace(/^([^@/:]+)\/([^:/]+)(:(\/.*))/, '$1:$2')); // test against path, but use ctx.url to retain parameters
|
||||
return;
|
||||
|
@ -43,6 +38,11 @@ async function redirectMiddleware(ctx, next) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (path === '/') {
|
||||
ctx.redirect(`/$/${PAGES.CHANNELS_FOLLOWING}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// No redirects needed
|
||||
await next();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue