setting: 优化默认值插入

This commit is contained in:
undefined committed 2020-10-28 21:55:35 +08:00
1 parent 06ff754af3
commit f3be3fc787
3 files changed
+8 -9

No files matched your search

+1 -1
View File
@@ -199,7 +199,7 @@ export async function inc(_id: number, field: string, n = 1) {
export async function create(
mail: string, uname: string, password: string,
uid?: number, regip = '127.0.0.1', priv = PRIV.PRIV_DEFAULT,
uid = 0, regip = '127.0.0.1', priv = PRIV.PRIV_DEFAULT,
) {
const salt = String.random();
if (!uid) uid = await system.inc('user');