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