core: fix user_register

This commit is contained in:
undefined committed 2021-06-06 16:09:43 +08:00
1 parent 52fcfdb665
commit 2b52930e9a
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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",
+1 -1
View File
@@ -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') {