Shun Miyazawa hace 4 años
padre
commit
3e6dce7d1a
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. 5 5
      src/server/routes/apiv3/users.js

+ 5 - 5
src/server/routes/apiv3/users.js

@@ -358,11 +358,11 @@ module.exports = (crowi) => {
    */
    */
   router.post('/invite', loginRequiredStrictly, adminRequired, csrf, validator.inviteEmail, apiV3FormValidator, async(req, res) => {
   router.post('/invite', loginRequiredStrictly, adminRequired, csrf, validator.inviteEmail, apiV3FormValidator, async(req, res) => {
 
 
-    let invitedUserList;
+    let afterWorkEmailList;
 
 
     // Create users
     // Create users
     try {
     try {
-      invitedUserList = await User.createUsersByInvitation(req.body.shapedEmailList);
+      afterWorkEmailList = await User.createUsersByInvitation(req.body.shapedEmailList);
     }
     }
     catch {
     catch {
       const msg = 'Failed to create user';
       const msg = 'Failed to create user';
@@ -372,13 +372,13 @@ module.exports = (crowi) => {
     // Send email
     // Send email
     try {
     try {
       if (req.body.sendEmail) {
       if (req.body.sendEmail) {
-        await User.sendEmailbyUserList(invitedUserList.createdUserList);
+        await User.sendEmailbyUserList(afterWorkEmailList.createdUserList);
       }
       }
-      return res.apiv3({ invitedUserList }, 201);
+      return res.apiv3({ afterWorkEmailList }, 201);
     }
     }
     catch (err) {
     catch (err) {
       const msg = 'Failed to send mail';
       const msg = 'Failed to send mail';
-      return res.apiv3Err(new ErrorV3(msg, invitedUserList.createdUserList));
+      return res.apiv3Err(new ErrorV3(msg, afterWorkEmailList.createdUserList));
     }
     }
   });
   });