mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: allow username change with cli (#177)
This commit is contained in:
1 parent
689c4cba6d
commit
a2f6d1460e
2 files changed
+6
-1
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.32.32",
|
"version": "2.32.33",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -210,6 +210,11 @@ class UserModel {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ArgMethod
|
||||||
|
static setUname(uid: number, uname: string) {
|
||||||
|
return UserModel.setById(uid, { uname, unameLower: uname.trim().toLowerCase() });
|
||||||
|
}
|
||||||
|
|
||||||
@ArgMethod
|
@ArgMethod
|
||||||
static setEmail(uid: number, mail: string) {
|
static setEmail(uid: number, mail: string) {
|
||||||
return UserModel.setById(uid, { mail, mailLower: mail.trim().toLowerCase() });
|
return UserModel.setById(uid, { mail, mailLower: mail.trim().toLowerCase() });
|
||||||
|
|||||||
Reference in new issue
Block a user