|
|
@@ -454,12 +454,12 @@ module.exports = function(crowi, app) {
|
|
|
return res.json(ApiResponse.error('Valid email address is required'));
|
|
|
}
|
|
|
|
|
|
- // const array = req.body.emailInputValue.split('\n');
|
|
|
- // const emailList = array.filter((element) => { return element.match(/.+@.+\..+/) });
|
|
|
+ const array = req.body.emailInputValue.split('\n');
|
|
|
+ const emailList = array.filter((element) => { return element.match(/.+@.+\..+/) });
|
|
|
|
|
|
try {
|
|
|
// TODO GW-170 Create users based on mail list passed in array
|
|
|
- // await User.createUsersByInvitation(req.body.emailList.split('\n'), req.body.sendEmail);
|
|
|
+ await User.createUsersByInvitation(emailList, req.body.sendEmail);
|
|
|
return res.json(ApiResponse.success());
|
|
|
}
|
|
|
catch (err) {
|