mirror of
https://github.com/wassname/talk.git
synced 2026-07-31 12:50:48 +08:00
Fixed issues with e2e
This commit is contained in:
+11
-10
@@ -28,18 +28,19 @@ util.onshutdown([
|
||||
function getUserCreateAnswers(options) {
|
||||
if (options.flag_mode) {
|
||||
|
||||
let user = {
|
||||
email: options.email,
|
||||
password: options.password,
|
||||
confirmPassword: options.password,
|
||||
displayName: options.name,
|
||||
roles: []
|
||||
};
|
||||
|
||||
if (options.role && UserModel.USER_ROLES.indexOf(options.role) > -1) {
|
||||
|
||||
let roles = {};
|
||||
roles[options.role] = true;
|
||||
|
||||
return Promise.resolve({
|
||||
email: options.email,
|
||||
password: options.password,
|
||||
displayName: options.name,
|
||||
roles
|
||||
});
|
||||
user.roles = [options.role];
|
||||
}
|
||||
|
||||
return Promise.resolve(user);
|
||||
}
|
||||
|
||||
return inquirer.prompt([
|
||||
|
||||
Reference in New Issue
Block a user