mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: fix user_register
This commit is contained in:
1 parent
52fcfdb665
commit
2b52930e9a
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.28.23",
|
"version": "2.28.24",
|
||||||
"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",
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ class UserModel {
|
|||||||
@ArgMethod
|
@ArgMethod
|
||||||
static async create(
|
static async create(
|
||||||
mail: string, uname: string, password: string,
|
mail: string, uname: string, password: string,
|
||||||
uid: number = 0, regip: string = '127.0.0.1', priv: number = system.get('default.priv'),
|
uid?: number, regip: string = '127.0.0.1', priv: number = system.get('default.priv'),
|
||||||
) {
|
) {
|
||||||
const salt = String.random();
|
const salt = String.random();
|
||||||
if (typeof uid !== 'number') {
|
if (typeof uid !== 'number') {
|
||||||
|
|||||||
Reference in new issue
Block a user