You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
351 B
JavaScript
15 lines
351 B
JavaScript
4 years ago
|
const user = require('../model/user');
|
||
|
const system = require('../model/system');
|
||
|
|
||
|
async function run({
|
||
|
uname, password, mail, uid,
|
||
|
}) {
|
||
|
if (!uid) uid = await system.inc('user');
|
||
|
await user.create({
|
||
|
uid, uname, password, mail, regip: '127.0.0.1',
|
||
|
});
|
||
|
return uid;
|
||
|
}
|
||
|
|
||
|
global.Hydro.script.register = module.exports = { run };
|