reformat
This commit is contained in:
parent
65818f1db4
commit
cd1d2c85d8
@ -36,12 +36,16 @@ class ServerApplication{
|
||||
if(setting.cli){
|
||||
const userAdmin = await getAdmin(this.userController);
|
||||
if(await isAdminFirst(userAdmin)){
|
||||
const rl = createReadlineInterface({input:process.stdin,output:process.stdout});
|
||||
rl.setPrompt("put admin password : ");
|
||||
rl.prompt();
|
||||
const pw = await new Promise((res:(data:string)=>void,err)=>{
|
||||
rl.on('line',(data)=>res(data));
|
||||
const rl = createReadlineInterface({
|
||||
input:process.stdin,
|
||||
output:process.stdout
|
||||
});
|
||||
const pw = await new Promise((res:(data:string)=>void,err)=>{
|
||||
rl.question("put admin password :",(data)=>{
|
||||
res(data);
|
||||
});
|
||||
});
|
||||
rl.close();
|
||||
userAdmin.reset_password(pw);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user