소스 검색

associative array

itizawa 6 년 전
부모
커밋
3d3377d1f5
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/server/models/user.js

+ 2 - 2
src/server/models/user.js

@@ -662,7 +662,7 @@ module.exports = function(crowi) {
       createdUserList.push(createdEmail);
     }));
 
-    return [existingEmailList, createdUserList];
+    return { existingEmailList, createdUserList };
   };
 
   userSchema.statics.sendEmailbyUserList = async function(userList) {
@@ -705,7 +705,7 @@ module.exports = function(crowi) {
     const afterWorkEmailList = await this.createUsersByEmailList(emailList);
 
     if (toSendEmail) {
-      await this.sendEmailbyUserList(afterWorkEmailList[1]);
+      await this.sendEmailbyUserList(afterWorkEmailList.createdUserList);
     }
 
     return afterWorkEmailList;