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) => {
|
export const rediretHome = async (req: http.IncomingMessage, res: http.ServerResponse) => {
|
||||||
const user = await getLoginUser(req);
|
const user = await getLoginUser(req);
|
||||||
if (!user?.token) {
|
if (!user?.token) {
|
||||||
res.writeHead(302, { Location: '/root/login/' });
|
res.writeHead(302, { Location: '/root/home/' });
|
||||||
res.end();
|
res.end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ app
|
|||||||
<script>
|
<script>
|
||||||
const redirect = new URL('${reqUrl}', window.location.origin);
|
const redirect = new URL('${reqUrl}', window.location.origin);
|
||||||
const encodeRedirect = encodeURIComponent(redirect.toString());
|
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(() => {
|
setTimeout(() => {
|
||||||
window.location.href = toPage.toString();
|
window.location.href = toPage.toString();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user