const assignUser = require('../lib/assignUser');

module.exports = {
  method: 'POST',
  path: '/assign',
  config: {
    auth: {
      mode: 'try',
      strategy: 'session'
    }
  },
  handler: (req, rep) => {
    const body = JSON.parse(req.payload);
    const assignDetails = { assignUrl: `${body.issueUrl}/assignees` };
    if (req.auth.isAuthenticated) {
      assignUser(Object.assign(req.auth.credentials, assignDetails), (err, res, body) => {
        if (err) throw err;
        console.log(res, body);
      });
    }
  }
};

@@ -258,22 +258,21 @@
   const 
-assign
+issue
 Details 
@@ -279,22 +279,18 @@
 = %7B 
-assign
+issue
 Url: 
-%60$%7B
 body
@@ -302,20 +302,8 @@
 eUrl
-%7D/assignees%60
  %7D;%0A
@@ -391,22 +391,21 @@
 ntials, 
-assign
+issue
 Details)

Update object passed to assignUser.js to enable requests to multiple endpoints