remove: root/login
This commit is contained in:
@@ -10,7 +10,7 @@ import { getUserConfig } from '@/modules/fm-manager/index.ts';
|
||||
export const rediretHome = async (req: http.IncomingMessage, res: http.ServerResponse) => {
|
||||
const user = await getLoginUser(req);
|
||||
if (!user?.token) {
|
||||
res.writeHead(302, { Location: '/root/login/' });
|
||||
res.writeHead(302, { Location: '/root/home/' });
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ app
|
||||
<script>
|
||||
const redirect = new URL('${reqUrl}', window.location.origin);
|
||||
const encodeRedirect = encodeURIComponent(redirect.toString());
|
||||
const toPage = new URL('/root/login/?user-check=true&redirect='+encodeRedirect, window.location.origin);
|
||||
const toPage = new URL('/root/home/?user-check=true&redirect='+encodeRedirect, window.location.origin);
|
||||
setTimeout(() => {
|
||||
window.location.href = toPage.toString();
|
||||
}, 1000);
|
||||
|
||||
Reference in New Issue
Block a user