mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix login redirect
This commit is contained in:
1 parent
b3e558a376
commit
5d9b751969
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.25.2",
|
"version": "2.25.3",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class UserLoginHandler extends Handler {
|
|||||||
this.session.uid = udoc._id;
|
this.session.uid = udoc._id;
|
||||||
this.session.scope = PERM.PERM_ALL.toString();
|
this.session.scope = PERM.PERM_ALL.toString();
|
||||||
this.session.save = rememberme;
|
this.session.save = rememberme;
|
||||||
this.response.redirect = this.request.referer.endsWith('/login')
|
this.response.redirect = (this.request.referer || '/login').endsWith('/login')
|
||||||
? this.url('homepage')
|
? this.url('homepage')
|
||||||
: this.request.referer;
|
: this.request.referer;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user